[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

@@ -45,11 +45,22 @@ class DownloadAppOperation: ResultOperation<InstalledApp>
DatabaseManager.shared.persistentContainer.performBackgroundTask { (context) in
let app = context.object(with: self.app.objectID) as! App
let installedApp = InstalledApp(app: app,
let installedApp: InstalledApp
if let app = app.installedApp
{
installedApp = app
}
else
{
installedApp = InstalledApp(app: app,
bundleIdentifier: app.identifier,
expirationDate: Date(),
context: context)
}
installedApp.version = app.version
self.finish(.success(installedApp))
}
}