mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-11 07:43:28 +01:00
Downloads, resigns, and installs apps from start to finish
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="14490.99" systemVersion="18D109" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
|
||||
<entity name="App" representedClassName="App" syncable="YES">
|
||||
<attribute name="developerName" attributeType="String" syncable="YES"/>
|
||||
<attribute name="downloadURL" attributeType="URI" syncable="YES"/>
|
||||
<attribute name="iconName" attributeType="String" syncable="YES"/>
|
||||
<attribute name="identifier" attributeType="String" syncable="YES"/>
|
||||
<attribute name="localizedDescription" attributeType="String" syncable="YES"/>
|
||||
@@ -26,7 +27,7 @@
|
||||
<relationship name="app" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="App" inverseName="installedApp" inverseEntity="App" syncable="YES"/>
|
||||
</entity>
|
||||
<elements>
|
||||
<element name="App" positionX="-63" positionY="-18" width="128" height="195"/>
|
||||
<element name="App" positionX="-63" positionY="-18" width="128" height="210"/>
|
||||
<element name="InstalledApp" positionX="-63" positionY="0" width="128" height="135"/>
|
||||
</elements>
|
||||
</model>
|
||||
@@ -28,6 +28,8 @@ class App: NSManagedObject, Decodable
|
||||
@NSManaged private(set) var versionDate: Date
|
||||
@NSManaged private(set) var versionDescription: String?
|
||||
|
||||
@NSManaged private(set) var downloadURL: URL
|
||||
|
||||
/* Relationships */
|
||||
@NSManaged private(set) var installedApp: InstalledApp?
|
||||
|
||||
@@ -47,6 +49,7 @@ class App: NSManagedObject, Decodable
|
||||
case versionDate
|
||||
case iconName
|
||||
case screenshotNames
|
||||
case downloadURL
|
||||
}
|
||||
|
||||
required init(from decoder: Decoder) throws
|
||||
@@ -68,6 +71,8 @@ class App: NSManagedObject, Decodable
|
||||
self.iconName = try container.decode(String.self, forKey: .iconName)
|
||||
self.screenshotNames = try container.decodeIfPresent([String].self, forKey: .screenshotNames) ?? []
|
||||
|
||||
self.downloadURL = try container.decode(URL.self, forKey: .downloadURL)
|
||||
|
||||
context.insert(self)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user