[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

@@ -93,11 +93,11 @@
993250B12A258EE6001EF2C8 /* Remove3AppLimitView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 993250B02A258EE6001EF2C8 /* Remove3AppLimitView.swift */; }; 993250B12A258EE6001EF2C8 /* Remove3AppLimitView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 993250B02A258EE6001EF2C8 /* Remove3AppLimitView.swift */; };
993F069A2A26EBF000717CEA /* Error+Message.swift in Sources */ = {isa = PBXBuildFile; fileRef = 993F06992A26EBF000717CEA /* Error+Message.swift */; }; 993F069A2A26EBF000717CEA /* Error+Message.swift in Sources */ = {isa = PBXBuildFile; fileRef = 993F06992A26EBF000717CEA /* Error+Message.swift */; };
993F06A12A2797DE00717CEA /* vm_unaligned_copy_switch_race.h in Headers */ = {isa = PBXBuildFile; fileRef = 993250A62A258B3F001EF2C8 /* vm_unaligned_copy_switch_race.h */; }; 993F06A12A2797DE00717CEA /* vm_unaligned_copy_switch_race.h in Headers */ = {isa = PBXBuildFile; fileRef = 993250A62A258B3F001EF2C8 /* vm_unaligned_copy_switch_race.h */; };
993F06A22A27985A00717CEA /* CowExploits+AltStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 993250A92A258B40001EF2C8 /* CowExploits+AltStore.swift */; }; 993F06A22A27985A00717CEA /* MDC+AltStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 993250A92A258B40001EF2C8 /* MDC+AltStore.swift */; };
993F06A32A27985F00717CEA /* grant_full_disk_access.m in Sources */ = {isa = PBXBuildFile; fileRef = 993250AA2A258B41001EF2C8 /* grant_full_disk_access.m */; }; 993F06A32A27985F00717CEA /* grant_full_disk_access.m in Sources */ = {isa = PBXBuildFile; fileRef = 993250AA2A258B41001EF2C8 /* grant_full_disk_access.m */; };
993F06A42A27986400717CEA /* helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 993250A82A258B40001EF2C8 /* helpers.m */; }; 993F06A42A27986400717CEA /* helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = 993250A82A258B40001EF2C8 /* helpers.m */; };
993F06A52A27986900717CEA /* vm_unaligned_copy_switch_race.c in Sources */ = {isa = PBXBuildFile; fileRef = 993250AB2A258B41001EF2C8 /* vm_unaligned_copy_switch_race.c */; }; 993F06A52A27986900717CEA /* vm_unaligned_copy_switch_race.c in Sources */ = {isa = PBXBuildFile; fileRef = 993250AB2A258B41001EF2C8 /* vm_unaligned_copy_switch_race.c */; };
993F06A72A2798D000717CEA /* CowExploits+AltStoreCore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 993F06A62A2798D000717CEA /* CowExploits+AltStoreCore.swift */; }; 993F06A72A2798D000717CEA /* MDC+AltStoreCore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 993F06A62A2798D000717CEA /* MDC+AltStoreCore.swift */; };
994D6E9B29E326080045B3F7 /* minimuxer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99F87D1729D8E4C900B40039 /* minimuxer.swift */; }; 994D6E9B29E326080045B3F7 /* minimuxer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99F87D1729D8E4C900B40039 /* minimuxer.swift */; };
994D6EB529E35C130045B3F7 /* StoreApp+SideStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994D6EB429E35C130045B3F7 /* StoreApp+SideStore.swift */; }; 994D6EB529E35C130045B3F7 /* StoreApp+SideStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 994D6EB429E35C130045B3F7 /* StoreApp+SideStore.swift */; };
998E3B112A2061850046BBAA /* UnstableFeatures+SwiftUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 998E3B102A2061850046BBAA /* UnstableFeatures+SwiftUI.swift */; }; 998E3B112A2061850046BBAA /* UnstableFeatures+SwiftUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 998E3B102A2061850046BBAA /* UnstableFeatures+SwiftUI.swift */; };
@@ -668,12 +668,12 @@
993250A62A258B3F001EF2C8 /* vm_unaligned_copy_switch_race.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vm_unaligned_copy_switch_race.h; sourceTree = "<group>"; }; 993250A62A258B3F001EF2C8 /* vm_unaligned_copy_switch_race.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vm_unaligned_copy_switch_race.h; sourceTree = "<group>"; };
993250A72A258B3F001EF2C8 /* helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = helpers.h; sourceTree = "<group>"; }; 993250A72A258B3F001EF2C8 /* helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = helpers.h; sourceTree = "<group>"; };
993250A82A258B40001EF2C8 /* helpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = helpers.m; sourceTree = "<group>"; }; 993250A82A258B40001EF2C8 /* helpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = helpers.m; sourceTree = "<group>"; };
993250A92A258B40001EF2C8 /* CowExploits+AltStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CowExploits+AltStore.swift"; sourceTree = "<group>"; }; 993250A92A258B40001EF2C8 /* MDC+AltStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "MDC+AltStore.swift"; sourceTree = "<group>"; };
993250AA2A258B41001EF2C8 /* grant_full_disk_access.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = grant_full_disk_access.m; sourceTree = "<group>"; }; 993250AA2A258B41001EF2C8 /* grant_full_disk_access.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = grant_full_disk_access.m; sourceTree = "<group>"; };
993250AB2A258B41001EF2C8 /* vm_unaligned_copy_switch_race.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vm_unaligned_copy_switch_race.c; sourceTree = "<group>"; }; 993250AB2A258B41001EF2C8 /* vm_unaligned_copy_switch_race.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vm_unaligned_copy_switch_race.c; sourceTree = "<group>"; };
993250B02A258EE6001EF2C8 /* Remove3AppLimitView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Remove3AppLimitView.swift; sourceTree = "<group>"; }; 993250B02A258EE6001EF2C8 /* Remove3AppLimitView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Remove3AppLimitView.swift; sourceTree = "<group>"; };
993F06992A26EBF000717CEA /* Error+Message.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Error+Message.swift"; sourceTree = "<group>"; }; 993F06992A26EBF000717CEA /* Error+Message.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Error+Message.swift"; sourceTree = "<group>"; };
993F06A62A2798D000717CEA /* CowExploits+AltStoreCore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CowExploits+AltStoreCore.swift"; sourceTree = "<group>"; }; 993F06A62A2798D000717CEA /* MDC+AltStoreCore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MDC+AltStoreCore.swift"; sourceTree = "<group>"; };
994D6EB429E35C130045B3F7 /* StoreApp+SideStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "StoreApp+SideStore.swift"; sourceTree = "<group>"; }; 994D6EB429E35C130045B3F7 /* StoreApp+SideStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "StoreApp+SideStore.swift"; sourceTree = "<group>"; };
9961EC2D29BE9F2E00AF2C6F /* minimuxer-helpers.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "minimuxer-helpers.swift"; path = "Dependencies/minimuxer/minimuxer-helpers.swift"; sourceTree = SOURCE_ROOT; }; 9961EC2D29BE9F2E00AF2C6F /* minimuxer-helpers.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "minimuxer-helpers.swift"; path = "Dependencies/minimuxer/minimuxer-helpers.swift"; sourceTree = SOURCE_ROOT; };
998E3B102A2061850046BBAA /* UnstableFeatures+SwiftUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UnstableFeatures+SwiftUI.swift"; sourceTree = "<group>"; }; 998E3B102A2061850046BBAA /* UnstableFeatures+SwiftUI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UnstableFeatures+SwiftUI.swift"; sourceTree = "<group>"; };
@@ -1381,8 +1381,8 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
993250B02A258EE6001EF2C8 /* Remove3AppLimitView.swift */, 993250B02A258EE6001EF2C8 /* Remove3AppLimitView.swift */,
993250A92A258B40001EF2C8 /* CowExploits+AltStore.swift */, 993250A92A258B40001EF2C8 /* MDC+AltStore.swift */,
993F06A62A2798D000717CEA /* CowExploits+AltStoreCore.swift */, 993F06A62A2798D000717CEA /* MDC+AltStoreCore.swift */,
993250A52A258B3E001EF2C8 /* grant_full_disk_access.h */, 993250A52A258B3E001EF2C8 /* grant_full_disk_access.h */,
993250AA2A258B41001EF2C8 /* grant_full_disk_access.m */, 993250AA2A258B41001EF2C8 /* grant_full_disk_access.m */,
993250A72A258B3F001EF2C8 /* helpers.h */, 993250A72A258B3F001EF2C8 /* helpers.h */,
@@ -2850,7 +2850,7 @@
BFAECC5A2501B0A400528F27 /* NetworkConnection.swift in Sources */, BFAECC5A2501B0A400528F27 /* NetworkConnection.swift in Sources */,
D5F99A1828D11DB500476A16 /* AltStore10ToAltStore11.xcmappingmodel in Sources */, D5F99A1828D11DB500476A16 /* AltStore10ToAltStore11.xcmappingmodel in Sources */,
BF66EEE92501AED0007EE018 /* JSONDecoder+Properties.swift in Sources */, BF66EEE92501AED0007EE018 /* JSONDecoder+Properties.swift in Sources */,
993F06A72A2798D000717CEA /* CowExploits+AltStoreCore.swift in Sources */, 993F06A72A2798D000717CEA /* MDC+AltStoreCore.swift in Sources */,
BF66EEEB2501AED0007EE018 /* UIApplication+AppExtension.swift in Sources */, BF66EEEB2501AED0007EE018 /* UIApplication+AppExtension.swift in Sources */,
BF66EED92501AECA007EE018 /* Team.swift in Sources */, BF66EED92501AECA007EE018 /* Team.swift in Sources */,
BF66EED12501AECA007EE018 /* AltStore3ToAltStore4.xcmappingmodel in Sources */, BF66EED12501AECA007EE018 /* AltStore3ToAltStore4.xcmappingmodel in Sources */,
@@ -3063,7 +3063,7 @@
1FA5A6CC298E8FE4007BA946 /* MailComposeView.swift in Sources */, 1FA5A6CC298E8FE4007BA946 /* MailComposeView.swift in Sources */,
BF3BEFBF2408673400DE7D55 /* FetchProvisioningProfilesOperation.swift in Sources */, BF3BEFBF2408673400DE7D55 /* FetchProvisioningProfilesOperation.swift in Sources */,
BFF0B69023219C6D007A79E1 /* PatreonComponents.swift in Sources */, BFF0B69023219C6D007A79E1 /* PatreonComponents.swift in Sources */,
993F06A22A27985A00717CEA /* CowExploits+AltStore.swift in Sources */, 993F06A22A27985A00717CEA /* MDC+AltStore.swift in Sources */,
1FB96FC5292A7251007E68D1 /* BrowseAppPreviewView.swift in Sources */, 1FB96FC5292A7251007E68D1 /* BrowseAppPreviewView.swift in Sources */,
BFBE0004250ACFFB0080826E /* ViewApp.intentdefinition in Sources */, BFBE0004250ACFFB0080826E /* ViewApp.intentdefinition in Sources */,
BF56D2AF23DF9E310006506D /* AppIDsViewController.swift in Sources */, BF56D2AF23DF9E310006506D /* AppIDsViewController.swift in Sources */,

View File

@@ -58,7 +58,7 @@ final class LaunchViewController: RSTLaunchViewController, UIDocumentPickerDeleg
super.viewDidAppear(true) super.viewDidAppear(true)
#if MDC #if MDC
CowExploits.alertIfNotPatched() MDC.alertIfNotPatched()
#endif #endif
#if !targetEnvironment(simulator) #if !targetEnvironment(simulator)

View File

@@ -1,10 +1,10 @@
// Extension of CowExploits+AltStoreCore for the functionality AltStore uses // 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 CowExploits to determine the free app limit // 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 Foundation
import AltStoreCore import AltStoreCore
extension CowExploits { extension MDC {
#if MDC #if MDC
enum PatchError: LocalizedError { enum PatchError: LocalizedError {
case NoFDA(error: String) case NoFDA(error: String)
@@ -37,7 +37,7 @@ extension CowExploits {
#else #else
print("The patch would be running right now if you weren't using a simulator. It will stop \"running\" in 3 seconds.") 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))) 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 #endif
UserDefaults.shared.lastInstalldPatchBootTime = bootTime() UserDefaults.shared.lastInstalldPatchBootTime = bootTime()
@@ -53,7 +53,7 @@ extension CowExploits {
leftButton: (text: L10n.Remove3AppLimitView.NotAppliedAlert.apply, action: { _ in leftButton: (text: L10n.Remove3AppLimitView.NotAppliedAlert.apply, action: { _ in
Task { Task {
do { do {
try await CowExploits.patch3AppLimit() try await MDC.patch3AppLimit()
await UIApplication.alert( await UIApplication.alert(
title: L10n.Remove3AppLimitView.success title: L10n.Remove3AppLimitView.success

View File

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

View File

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

View File

@@ -106,7 +106,7 @@ struct SettingsView: View {
Remove3AppLimitView() Remove3AppLimitView()
} }
#else #else
if CowExploits.isSupported { if MDC.isSupported {
NavigationLink(L10n.Remove3AppLimitView.title) {} NavigationLink(L10n.Remove3AppLimitView.title) {}
.disabled(true) .disabled(true)
.alert(isPresented: self.$isShowingMDCPopup) { .alert(isPresented: self.$isShowingMDCPopup) {

View File

@@ -17,7 +17,7 @@ public extension InstalledApp
// Free developer accounts are limited to only 3 active sideloaded apps at a time as of iOS 13.3.1. However, the MDC exploit allows you to have 10 per Apple ID/SideStore instance. // Free developer accounts are limited to only 3 active sideloaded apps at a time as of iOS 13.3.1. However, the MDC exploit allows you to have 10 per Apple ID/SideStore instance.
static var freeAccountActiveAppsLimit: Int { static var freeAccountActiveAppsLimit: Int {
#if MDC #if MDC
if CowExploits.installdHasBeenPatched { if MDC.installdHasBeenPatched {
return 10 return 10
} else { } else {
return 3 return 3