[AltStore] Update apps from UpdatesViewController

This commit is contained in:
Riley Testut
2019-06-17 14:49:23 -07:00
parent 9538d05f9f
commit d65cef8817
10 changed files with 231 additions and 30 deletions

View File

@@ -34,9 +34,13 @@
<entity name="InstalledApp" representedClassName="InstalledApp" syncable="YES">
<attribute name="bundleIdentifier" attributeType="String" syncable="YES"/>
<attribute name="expirationDate" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
<attribute name="isBeta" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
<attribute name="version" attributeType="String" syncable="YES"/>
<relationship name="app" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="App" inverseName="installedApp" inverseEntity="App" syncable="YES"/>
<uniquenessConstraints>
<uniquenessConstraint>
<constraint value="bundleIdentifier"/>
</uniquenessConstraint>
</uniquenessConstraints>
</entity>
<entity name="Team" representedClassName="Team" syncable="YES">
<attribute name="identifier" attributeType="String" syncable="YES"/>
@@ -53,7 +57,7 @@
<elements>
<element name="Account" positionX="-36" positionY="90" width="128" height="135"/>
<element name="App" positionX="-63" positionY="-18" width="128" height="210"/>
<element name="InstalledApp" positionX="-63" positionY="0" width="128" height="120"/>
<element name="InstalledApp" positionX="-63" positionY="0" width="128" height="105"/>
<element name="Team" positionX="-45" positionY="81" width="128" height="120"/>
</elements>
</model>

View File

@@ -18,8 +18,6 @@ class InstalledApp: NSManagedObject, Fetchable
@NSManaged var expirationDate: Date
@NSManaged var isBeta: Bool
/* Relationships */
@NSManaged private(set) var app: App!
@@ -34,7 +32,7 @@ class InstalledApp: NSManagedObject, Fetchable
let app = context.object(with: app.objectID) as! App
self.app = app
self.version = "0.9"
self.version = app.version
self.bundleIdentifier = bundleIdentifier
self.expirationDate = expirationDate