Use main profile when refreshing (#1013)

This commit is contained in:
Huge_Black
2025-06-22 20:31:13 +08:00
committed by GitHub
parent 00ed6e61be
commit 685d956775
4 changed files with 7 additions and 2 deletions

View File

@@ -1685,8 +1685,8 @@ private extension AppManager
let context = AppOperationContext(bundleIdentifier: app.bundleIdentifier, authenticatedContext: group.context)
context.app = ALTApplication(fileURL: app.fileURL)
// Since this doesn't involve modifying app bundle which will cause re-install, this is safe in refresh path
context.useMainProfile = app.useMainProfile
// Since this doesn't involve modifying app bundle which will cause re-install, this is safe in refresh path
//App-Extensions: Ensure DB data and disk state must match
let dbAppEx: Set<InstalledExtension> = Set(app.appExtensions)
let diskAppEx: Set<ALTApplication> = Set(context.app!.appExtensions)

View File

@@ -72,6 +72,8 @@ final class InstallAppOperation: ResultOperation<InstalledApp>
}
installedApp.update(resignedApp: resignedApp, certificateSerialNumber: certificate.serialNumber, storeBuildVersion: storeBuildVersion)
installedApp.useMainProfile = self.context.useMainProfile
installedApp.needsResign = false
if let team = DatabaseManager.shared.activeTeam(in: backgroundContext)