From 0fe8d7fed98ab003bf4def16a9f24b89010ae354 Mon Sep 17 00:00:00 2001 From: spidy123222 Date: Mon, 31 Mar 2025 22:36:55 -0700 Subject: [PATCH] Move to SendAppOperation --- AltStore/Managing Apps/AppManager.swift | 4 ---- AltStore/Operations/SendAppOperation.swift | 6 +++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/AltStore/Managing Apps/AppManager.swift b/AltStore/Managing Apps/AppManager.swift index f873307a..7b613e0b 100644 --- a/AltStore/Managing Apps/AppManager.swift +++ b/AltStore/Managing Apps/AppManager.swift @@ -959,10 +959,6 @@ extension AppManager let installationProgress = Progress.discreteProgress(totalUnitCount: 100) installationProgress.addChild(sendAppOperation.progress, withPendingUnitCount: 40) - let shortcutURLoff = URL(string: "shortcuts://run-shortcut?name=TurnOffData")! - let shortcutURLon = URL(string: "shortcuts://run-shortcut?name=TurnOnData")! - - UIApplication.shared.open(shortcutURLoff, options: [:], completionHandler: nil) installationProgress.addChild(installOperation.progress, withPendingUnitCount: 60) /* Patch */ diff --git a/AltStore/Operations/SendAppOperation.swift b/AltStore/Operations/SendAppOperation.swift index 0da089a7..9580a3ca 100644 --- a/AltStore/Operations/SendAppOperation.swift +++ b/AltStore/Operations/SendAppOperation.swift @@ -41,9 +41,13 @@ final class SendAppOperation: ResultOperation<()> } // self.context.resignedApp.fileURL points to the app bundle, but we want the .ipa. + let shortcutURLoff = URL(string: "shortcuts://run-shortcut?name=TurnOffData")! + let shortcutURLon = URL(string: "shortcuts://run-shortcut?name=TurnOnData")! + + UIApplication.shared.open(shortcutURLoff, options: [:], completionHandler: nil) + let app = AnyApp(name: resignedApp.name, bundleIdentifier: self.context.bundleIdentifier, url: resignedApp.fileURL, storeApp: nil) let fileURL = InstalledApp.refreshedIPAURL(for: app) - print("AFC App `fileURL`: \(fileURL.absoluteString)") if let data = NSData(contentsOf: fileURL) {