mirror of
https://github.com/SideStore/SideStore.git
synced 2026-03-27 12:55:40 +01:00
Only run turn off data shortcut when minimuxer is not ready and below 26.4
This commit is contained in:
@@ -214,9 +214,10 @@ final class InstallAppOperation: ResultOperation<InstalledApp>
|
|||||||
alert.addAction(UIAlertAction(title: NSLocalizedString("Continue", comment: ""), style: .default, handler: { _ in
|
alert.addAction(UIAlertAction(title: NSLocalizedString("Continue", comment: ""), style: .default, handler: { _ in
|
||||||
print("Going home")
|
print("Going home")
|
||||||
// Cell Shortcut
|
// Cell Shortcut
|
||||||
|
if self.context.shouldTurnOffData {
|
||||||
UIApplication.shared.open(shortcutURLonDelay, options: [:]) { _ in
|
UIApplication.shared.open(shortcutURLonDelay, options: [:]) { _ in
|
||||||
print("Cell OFF Shortcut finished execution.")}
|
print("Cell OFF Shortcut finished execution.")}
|
||||||
|
}
|
||||||
UIApplication.shared.perform(#selector(NSXPCConnection.suspend))
|
UIApplication.shared.perform(#selector(NSXPCConnection.suspend))
|
||||||
}))
|
}))
|
||||||
|
|
||||||
@@ -234,7 +235,9 @@ final class InstallAppOperation: ResultOperation<InstalledApp>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Cell Shortcut
|
// Cell Shortcut
|
||||||
|
if self.context.shouldTurnOffData {
|
||||||
UIApplication.shared.open(shortcutURLonDelay, options: [:]) { _ in print("Cell OFF Shortcut finished execution.")}
|
UIApplication.shared.open(shortcutURLonDelay, options: [:]) { _ in print("Cell OFF Shortcut finished execution.")}
|
||||||
|
}
|
||||||
UIApplication.shared.perform(#selector(NSXPCConnection.suspend))
|
UIApplication.shared.perform(#selector(NSXPCConnection.suspend))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,6 +123,8 @@ class InstallAppOperationContext: AppOperationContext
|
|||||||
|
|
||||||
var alternateIconURL: URL?
|
var alternateIconURL: URL?
|
||||||
|
|
||||||
|
var shouldTurnOffData: Bool = false
|
||||||
|
|
||||||
// Non-nil when installing from a source.
|
// Non-nil when installing from a source.
|
||||||
@AsyncManaged
|
@AsyncManaged
|
||||||
var appVersion: AppVersion?
|
var appVersion: AppVersion?
|
||||||
|
|||||||
@@ -42,10 +42,25 @@ final class SendAppOperation: ResultOperation<()>
|
|||||||
let fileURL = InstalledApp.refreshedIPAURL(for: app)
|
let fileURL = InstalledApp.refreshedIPAURL(for: app)
|
||||||
print("AFC App `fileURL`: \(fileURL.absoluteString)")
|
print("AFC App `fileURL`: \(fileURL.absoluteString)")
|
||||||
|
|
||||||
|
// 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
|
// Wait for Shortcut to Finish Before Proceeding
|
||||||
UIApplication.shared.open(shortcutURLoff, options: [:]) { _ in
|
UIApplication.shared.open(shortcutURLoff, options: [:]) { _ in
|
||||||
print("Shortcut finished execution. Proceeding with file transfer.")
|
print("Shortcut finished execution. Proceeding with file transfer.")
|
||||||
|
|
||||||
|
DispatchQueue.global().async {
|
||||||
|
self.processFile(at: fileURL, for: app.bundleIdentifier)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
DispatchQueue.global().async {
|
DispatchQueue.global().async {
|
||||||
self.processFile(at: fileURL, for: app.bundleIdentifier)
|
self.processFile(at: fileURL, for: app.bundleIdentifier)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user