Displays progress when downloading/refreshing apps

Refactors download/refresh steps into separate Operation subclasses
This commit is contained in:
Riley Testut
2019-06-10 15:03:47 -07:00
parent 4f372f959a
commit a932e0759e
19 changed files with 1330 additions and 962 deletions

View File

@@ -10,7 +10,7 @@ import Foundation
import CoreData
@objc(InstalledApp)
class InstalledApp: NSManagedObject
class InstalledApp: NSManagedObject, Fetchable
{
/* Properties */
@NSManaged var bundleIdentifier: String
@@ -75,6 +75,13 @@ extension InstalledApp
return ipaURL
}
class func refreshedIPAURL(for app: App) -> URL
{
let ipaURL = self.directoryURL(for: app).appendingPathComponent("Refreshed.ipa")
return ipaURL
}
class func directoryURL(for app: App) -> URL
{
let directoryURL = InstalledApp.appsDirectoryURL.appendingPathComponent(app.identifier)
@@ -92,4 +99,8 @@ extension InstalledApp
var ipaURL: URL {
return InstalledApp.ipaURL(for: self.app)
}
var refreshedIPAURL: URL {
return InstalledApp.refreshedIPAURL(for: self.app)
}
}