[skip ci] refactor: rename CowExploits to MDC

This commit is contained in:
naturecodevoid
2023-06-04 08:08:48 -07:00
parent 373a73c158
commit 2ff637f62e
7 changed files with 22 additions and 22 deletions

View File

@@ -1,10 +1,10 @@
// Extension of CowExploits+AltStoreCore for the functionality AltStore uses
// The only reason we can't have it all in AltStore is because AltStoreCore requires one variable of CowExploits to determine the free app limit
// Extension of MDC+AltStoreCore for the functionality AltStore uses
// The only reason we can't have it all in AltStore is because AltStoreCore requires one variable of MDC to determine the free app limit
import Foundation
import AltStoreCore
extension CowExploits {
extension MDC {
#if MDC
enum PatchError: LocalizedError {
case NoFDA(error: String)
@@ -37,7 +37,7 @@ extension CowExploits {
#else
print("The patch would be running right now if you weren't using a simulator. It will stop \"running\" in 3 seconds.")
try await Task.sleep(nanoseconds: UInt64(3 * Double(NSEC_PER_SEC)))
// throw CowExploits.PatchError.NoFDA(error: "This is a test error")
// throw MDC.PatchError.NoFDA(error: "This is a test error")
#endif
UserDefaults.shared.lastInstalldPatchBootTime = bootTime()
@@ -53,7 +53,7 @@ extension CowExploits {
leftButton: (text: L10n.Remove3AppLimitView.NotAppliedAlert.apply, action: { _ in
Task {
do {
try await CowExploits.patch3AppLimit()
try await MDC.patch3AppLimit()
await UIApplication.alert(
title: L10n.Remove3AppLimitView.success

View File

@@ -1,5 +1,5 @@
//
// CowExploits+AltStoreCore.swift
// MDC+AltStoreCore.swift
// AltStoreCore
//
// Created by naturecodevoid on 5/31/23.
@@ -8,10 +8,10 @@
import Foundation
// Parts of CowExploits we need in AltStoreCore
// Parts of MDC we need in AltStoreCore
// TODO: destroy AltStoreCore
public class CowExploits {
public class MDC {
#if MDC
public static var installdHasBeenPatched: Bool {
guard let lastInstalldPatchBootTime = UserDefaults.shared.lastInstalldPatchBootTime else { return false }

View File

@@ -45,10 +45,10 @@ struct Remove3AppLimitView: View {
var body: some View {
VStack {
if !CowExploits.isSupported {
if !MDC.isSupported {
notSupported.common()
} else {
if CowExploits.installdHasBeenPatched {
if MDC.installdHasBeenPatched {
installdHasBeenPatched.common()
} else {
applyPatch.common()
@@ -58,7 +58,7 @@ struct Remove3AppLimitView: View {
guard !runningPatch else { return }
runningPatch = true
try await CowExploits.patch3AppLimit()
try await MDC.patch3AppLimit()
showSuccessAlert = true
} catch {