diff --git a/AltStore/Operations/InstallAppOperation.swift b/AltStore/Operations/InstallAppOperation.swift index 9bf46298..1e68be03 100644 --- a/AltStore/Operations/InstallAppOperation.swift +++ b/AltStore/Operations/InstallAppOperation.swift @@ -214,13 +214,11 @@ final class InstallAppOperation: ResultOperation alert.addAction(UIAlertAction(title: NSLocalizedString("Continue", comment: ""), style: .default, handler: { _ in print("Going home") // Cell Shortcut - - DispatchQueue.main.async{ -// UIApplication.shared.open(shortcutURLonDelay, options: [:]) { _ in -// print("Cell OFF Shortcut finished execution.") -// } - UIApplication.shared.perform(#selector(NSXPCConnection.suspend)) + if self.context.shouldTurnOffData { + UIApplication.shared.open(shortcutURLonDelay, options: [:]) { _ in + print("Cell OFF Shortcut finished execution.")} } + UIApplication.shared.perform(#selector(NSXPCConnection.suspend)) })) DispatchQueue.main.async { @@ -236,14 +234,11 @@ final class InstallAppOperation: ResultOperation } } } - - DispatchQueue.main.async { - // Cell Shortcut -// UIApplication.shared.open(shortcutURLonDelay, options: [:]) { _ in -// print("Cell OFF Shortcut finished execution.") -// } - UIApplication.shared.perform(#selector(NSXPCConnection.suspend)) + // Cell Shortcut + if self.context.shouldTurnOffData { + UIApplication.shared.open(shortcutURLonDelay, options: [:]) { _ in print("Cell OFF Shortcut finished execution.")} } + UIApplication.shared.perform(#selector(NSXPCConnection.suspend)) } } diff --git a/AltStore/Operations/OperationContexts.swift b/AltStore/Operations/OperationContexts.swift index a1327c66..fdbc87bc 100644 --- a/AltStore/Operations/OperationContexts.swift +++ b/AltStore/Operations/OperationContexts.swift @@ -123,6 +123,8 @@ class InstallAppOperationContext: AppOperationContext var alternateIconURL: URL? + var shouldTurnOffData: Bool = false + // Non-nil when installing from a source. @AsyncManaged var appVersion: AppVersion? diff --git a/AltStore/Operations/SendAppOperation.swift b/AltStore/Operations/SendAppOperation.swift index 1b6bdb25..d8990176 100644 --- a/AltStore/Operations/SendAppOperation.swift +++ b/AltStore/Operations/SendAppOperation.swift @@ -8,8 +8,6 @@ import Foundation import Network import AltStoreCore -import Minimuxer - @objc(SendAppOperation) final class SendAppOperation: ResultOperation<()> @@ -44,15 +42,28 @@ final class SendAppOperation: ResultOperation<()> let fileURL = InstalledApp.refreshedIPAURL(for: app) print("AFC App `fileURL`: \(fileURL.absoluteString)") - // Wait for Shortcut to Finish Before Proceeding - DispatchQueue.main.async { -// UIApplication.shared.open(shortcutURLoff, options: [:]) { _ in -// print("Shortcut finished execution. Proceeding with file transfer.") + // only when minimuxer is not ready and below 26.4 should we turn off data + if #available(iOS 26.4, *) { + context.shouldTurnOffData = false + } else if !isMinimuxerReady { + context.shouldTurnOffData = true + } else { + context.shouldTurnOffData = false + } + + if context.shouldTurnOffData { + // Wait for Shortcut to Finish Before Proceeding + UIApplication.shared.open(shortcutURLoff, options: [:]) { _ in + print("Shortcut finished execution. Proceeding with file transfer.") DispatchQueue.global().async { self.processFile(at: fileURL, for: app.bundleIdentifier) } -// } + } + } else { + DispatchQueue.global().async { + self.processFile(at: fileURL, for: app.bundleIdentifier) + } } } diff --git a/AltStore/Resources/AltBackup.ipa b/AltStore/Resources/AltBackup.ipa new file mode 120000 index 00000000..395e0998 --- /dev/null +++ b/AltStore/Resources/AltBackup.ipa @@ -0,0 +1 @@ +../../build/AltBackup.ipa \ No newline at end of file diff --git a/Makefile b/Makefile index 937e80d7..a5d653f2 100755 --- a/Makefile +++ b/Makefile @@ -374,8 +374,7 @@ ipa-altbackup: checkPaths copy-altbackup @echo " Copying from $(ALT_APP_SRC) into $(ALT_APP_PAYLOAD_DST)" @cp -R -f "$(ALT_APP_SRC)/." "$(ALT_APP_PAYLOAD_DST)/$(TARGET_NAME)" @pushd "$(ALT_APP_DST_ARCHIVE)" && zip -r "../../$(ALT_APP_IPA_DST)" Payload || popd - @cp -f "$(ALT_APP_IPA_DST)" AltStore/Resources - @echo " IPA created: AltStore/Resources/AltBackup.ipa" + @echo " IPA created: build/AltBackup.ipa" clean-altbackup: @echo "" diff --git a/trustedapps.json b/trustedapps.json index 8047e934..227dfafa 100644 --- a/trustedapps.json +++ b/trustedapps.json @@ -75,6 +75,10 @@ { "identifier": "thatstel.la.altsource", "sourceURL": "https://alt.thatstel.la/" + }, + { + "identifier": "com.deliacheminot.mona", + "sourceURL": "https://raw.githubusercontent.com/delia-cheminot/mona-hrt/refs/heads/main/ios_source.json" } ], "sources": [ @@ -148,6 +152,10 @@ { "identifier": "thatstel.la.altsource", "sourceURL": "https://alt.thatstel.la/" + }, + { + "identifier": "com.deliacheminot.mona", + "sourceURL": "https://raw.githubusercontent.com/delia-cheminot/mona-hrt/refs/heads/main/ios_source.json" } ] }