From e81dc905c9dacdafdba82fbe6783eb06b6c5a7d9 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Wed, 31 Jul 2019 15:19:27 -0700 Subject: [PATCH] =?UTF-8?q?[AltStore]=20Fixes=20not=20updating=20app?= =?UTF-8?q?=E2=80=99s=20version=20number=20when=20updating?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AltStore/Model/DatabaseManager.swift | 2 ++ AltStore/Operations/InstallAppOperation.swift | 2 ++ 2 files changed, 4 insertions(+) diff --git a/AltStore/Model/DatabaseManager.swift b/AltStore/Model/DatabaseManager.swift index c440e4ba..80553111 100644 --- a/AltStore/Model/DatabaseManager.swift +++ b/AltStore/Model/DatabaseManager.swift @@ -152,6 +152,8 @@ private extension DatabaseManager installedApp.storeApp = storeApp } + installedApp.version = localApp.version + let fileURL = installedApp.fileURL if !FileManager.default.fileExists(atPath: fileURL.path) diff --git a/AltStore/Operations/InstallAppOperation.swift b/AltStore/Operations/InstallAppOperation.swift index f772adca..3054f54a 100644 --- a/AltStore/Operations/InstallAppOperation.swift +++ b/AltStore/Operations/InstallAppOperation.swift @@ -57,6 +57,8 @@ class InstallAppOperation: ResultOperation installedApp = InstalledApp(resignedApp: resignedApp, originalBundleIdentifier: self.context.bundleIdentifier, context: backgroundContext) } + installedApp.version = resignedApp.version + if let profile = resignedApp.provisioningProfile { installedApp.refreshedDate = profile.creationDate