mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Adds InstalledApp.installedDate
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
<attribute name="resignedBundleIdentifier" attributeType="String" syncable="YES"/>
|
||||
<attribute name="version" attributeType="String" syncable="YES"/>
|
||||
<relationship name="storeApp" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="StoreApp" inverseName="installedApp" inverseEntity="StoreApp" syncable="YES"/>
|
||||
<attribute name="installedDate" attributeType="Date" usesScalarValueType="NO"/>
|
||||
<relationship name="team" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Team" inverseName="installedApps" inverseEntity="Team"/>
|
||||
<uniquenessConstraints>
|
||||
<uniquenessConstraint>
|
||||
|
||||
@@ -168,6 +168,7 @@ private extension DatabaseManager
|
||||
{
|
||||
installedApp = InstalledApp(resignedApp: localApp, originalBundleIdentifier: StoreApp.altstoreAppID, context: context)
|
||||
installedApp.storeApp = storeApp
|
||||
installedApp.installedDate = Date()
|
||||
}
|
||||
|
||||
let fileURL = installedApp.fileURL
|
||||
|
||||
@@ -22,6 +22,7 @@ class InstalledApp: NSManagedObject, Fetchable
|
||||
|
||||
@NSManaged var refreshedDate: Date
|
||||
@NSManaged var expirationDate: Date
|
||||
@NSManaged var installedDate: Date
|
||||
|
||||
/* Relationships */
|
||||
@NSManaged var storeApp: StoreApp?
|
||||
@@ -55,7 +56,9 @@ class InstalledApp: NSManagedObject, Fetchable
|
||||
{
|
||||
self.refreshedDate = Date()
|
||||
self.expirationDate = self.refreshedDate.addingTimeInterval(60 * 60 * 24 * 7) // Rough estimate until we get real values from provisioning profile.
|
||||
}
|
||||
}
|
||||
|
||||
self.installedDate = Date()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ class InstallAppOperation: ResultOperation<InstalledApp>
|
||||
else
|
||||
{
|
||||
installedApp = InstalledApp(resignedApp: resignedApp, originalBundleIdentifier: self.context.bundleIdentifier, context: backgroundContext)
|
||||
installedApp.installedDate = Date()
|
||||
}
|
||||
|
||||
installedApp.version = resignedApp.version
|
||||
|
||||
Reference in New Issue
Block a user