mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-08 22:33:26 +01:00
Use main profile when refreshing (#1013)
This commit is contained in:
@@ -1685,7 +1685,7 @@ private extension AppManager
|
|||||||
|
|
||||||
let context = AppOperationContext(bundleIdentifier: app.bundleIdentifier, authenticatedContext: group.context)
|
let context = AppOperationContext(bundleIdentifier: app.bundleIdentifier, authenticatedContext: group.context)
|
||||||
context.app = ALTApplication(fileURL: app.fileURL)
|
context.app = ALTApplication(fileURL: app.fileURL)
|
||||||
|
context.useMainProfile = app.useMainProfile
|
||||||
// Since this doesn't involve modifying app bundle which will cause re-install, this is safe in refresh path
|
// 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
|
//App-Extensions: Ensure DB data and disk state must match
|
||||||
let dbAppEx: Set<InstalledExtension> = Set(app.appExtensions)
|
let dbAppEx: Set<InstalledExtension> = Set(app.appExtensions)
|
||||||
|
|||||||
@@ -72,6 +72,8 @@ final class InstallAppOperation: ResultOperation<InstalledApp>
|
|||||||
}
|
}
|
||||||
|
|
||||||
installedApp.update(resignedApp: resignedApp, certificateSerialNumber: certificate.serialNumber, storeBuildVersion: storeBuildVersion)
|
installedApp.update(resignedApp: resignedApp, certificateSerialNumber: certificate.serialNumber, storeBuildVersion: storeBuildVersion)
|
||||||
|
installedApp.useMainProfile = self.context.useMainProfile
|
||||||
|
|
||||||
installedApp.needsResign = false
|
installedApp.needsResign = false
|
||||||
|
|
||||||
if let team = DatabaseManager.shared.activeTeam(in: backgroundContext)
|
if let team = DatabaseManager.shared.activeTeam(in: backgroundContext)
|
||||||
|
|||||||
@@ -98,6 +98,7 @@
|
|||||||
<attribute name="refreshedDate" attributeType="Date" usesScalarValueType="NO"/>
|
<attribute name="refreshedDate" attributeType="Date" usesScalarValueType="NO"/>
|
||||||
<attribute name="resignedBundleIdentifier" attributeType="String"/>
|
<attribute name="resignedBundleIdentifier" attributeType="String"/>
|
||||||
<attribute name="storeBuildVersion" optional="YES" attributeType="String"/>
|
<attribute name="storeBuildVersion" optional="YES" attributeType="String"/>
|
||||||
|
<attribute name="useMainProfile" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
|
||||||
<attribute name="version" attributeType="String"/>
|
<attribute name="version" attributeType="String"/>
|
||||||
<relationship name="appExtensions" toMany="YES" deletionRule="Cascade" destinationEntity="InstalledExtension" inverseName="parentApp" inverseEntity="InstalledExtension"/>
|
<relationship name="appExtensions" toMany="YES" deletionRule="Cascade" destinationEntity="InstalledExtension" inverseName="parentApp" inverseEntity="InstalledExtension"/>
|
||||||
<relationship name="loggedErrors" toMany="YES" deletionRule="Nullify" destinationEntity="LoggedError" inverseName="installedApp" inverseEntity="LoggedError"/>
|
<relationship name="loggedErrors" toMany="YES" deletionRule="Nullify" destinationEntity="LoggedError" inverseName="installedApp" inverseEntity="LoggedError"/>
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ public class InstalledApp: BaseEntity, InstalledAppProtocol
|
|||||||
@NSManaged public var needsResign: Bool
|
@NSManaged public var needsResign: Bool
|
||||||
@NSManaged public var hasAlternateIcon: Bool
|
@NSManaged public var hasAlternateIcon: Bool
|
||||||
|
|
||||||
|
@NSManaged public var useMainProfile: Bool
|
||||||
|
|
||||||
@NSManaged public var certificateSerialNumber: String?
|
@NSManaged public var certificateSerialNumber: String?
|
||||||
@NSManaged public var storeBuildVersion: String?
|
@NSManaged public var storeBuildVersion: String?
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user