Only run turn off data shortcut when minimuxer is not ready and below 26.4

This commit is contained in:
Huge_Black
2026-03-21 12:01:16 +08:00
parent a1f71a8149
commit 01e73328f8
3 changed files with 28 additions and 8 deletions

View File

@@ -42,10 +42,25 @@ final class SendAppOperation: ResultOperation<()>
let fileURL = InstalledApp.refreshedIPAURL(for: app)
print("AFC App `fileURL`: \(fileURL.absoluteString)")
// Wait for Shortcut to Finish Before Proceeding
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)
}