From 729b2a1f0d786819f1819a9f0869a6f6dfce227e Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Mon, 1 Mar 2021 12:41:33 -0600 Subject: [PATCH] Limits iOS 14 AltDaemon workaround to only when using AltDaemon Refreshing with AltServer while jailbroken will now continue using provisioning profiles, but AltDaemon will still reinstall apps instead of just refreshing them. --- AltStore/Managing Apps/AppManager.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/AltStore/Managing Apps/AppManager.swift b/AltStore/Managing Apps/AppManager.swift index 8292154a..f66d1f2b 100644 --- a/AltStore/Managing Apps/AppManager.swift +++ b/AltStore/Managing Apps/AppManager.swift @@ -668,13 +668,16 @@ private extension AppManager // Check if backup app is installed in place of real app. let uti = UTTypeCopyDeclaration(app.installedBackupAppUTI as CFString)?.takeRetainedValue() as NSDictionary? - if app.certificateSerialNumber != group.context.certificate?.serialNumber || uti != nil || app.needsResign || (UIDevice.current.isJailbroken && !UserDefaults.standard.localServerSupportsRefreshing) + if app.certificateSerialNumber != group.context.certificate?.serialNumber || + uti != nil || + app.needsResign || + (group.context.server?.connectionType == .local && !UserDefaults.standard.localServerSupportsRefreshing) { // Resign app instead of just refreshing profiles because either: // * Refreshing using different certificate // * Backup app is still installed // * App explicitly needs resigning - // * Device is jailbroken and on iOS 14.0 or later (b/c refreshing with provisioning profiles is broken) + // * Device is jailbroken and using AltDaemon on iOS 14.0 or later (b/c refreshing with provisioning profiles is broken) let installProgress = self._install(app, operation: operation, group: group) { (result) in self.finish(operation, result: result, group: group, progress: progress)