[AltStore] Adds App.size

This commit is contained in:
Riley Testut
2019-07-29 16:02:15 -07:00
parent d3c4ebbb5f
commit 083f28896e
3 changed files with 9 additions and 1 deletions

View File

@@ -21,6 +21,7 @@
<attribute name="localizedDescription" attributeType="String" syncable="YES"/>
<attribute name="name" attributeType="String" syncable="YES"/>
<attribute name="screenshotNames" attributeType="Transformable" syncable="YES"/>
<attribute name="size" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
<attribute name="subtitle" optional="YES" attributeType="String" syncable="YES"/>
<attribute name="tintColor" optional="YES" attributeType="Transformable" syncable="YES"/>
<attribute name="version" attributeType="String" syncable="YES"/>
@@ -67,7 +68,7 @@
</entity>
<elements>
<element name="Account" positionX="-36" positionY="90" width="128" height="135"/>
<element name="App" positionX="-63" positionY="-18" width="128" height="255"/>
<element name="App" positionX="-63" positionY="-18" width="128" height="270"/>
<element name="AppPermission" positionX="-45" positionY="90" width="128" height="90"/>
<element name="InstalledApp" positionX="-63" positionY="0" width="128" height="150"/>
<element name="Team" positionX="-45" positionY="81" width="128" height="120"/>

View File

@@ -27,6 +27,7 @@ class App: NSManagedObject, Decodable, Fetchable
@NSManaged private(set) var developerName: String
@NSManaged private(set) var localizedDescription: String
@NSManaged private(set) var size: Int32
@NSManaged private(set) var iconName: String
@NSManaged private(set) var screenshotNames: [String]
@@ -66,6 +67,7 @@ class App: NSManagedObject, Decodable, Fetchable
case tintColor
case subtitle
case permissions
case size
}
required init(from decoder: Decoder) throws
@@ -100,6 +102,8 @@ class App: NSManagedObject, Decodable, Fetchable
self.tintColor = tintColor
}
self.size = try container.decode(Int32.self, forKey: .size)
let permissions = try container.decodeIfPresent([AppPermission].self, forKey: .permissions) ?? []
context.insert(self)