Downloads, resigns, and installs apps from start to finish

This commit is contained in:
Riley Testut
2019-05-31 18:24:08 -07:00
parent 87ac2799be
commit 8513c8242c
15 changed files with 590 additions and 113 deletions

View File

@@ -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)
}
}