mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Downloads latest _available_ version when updating from AppViewController
Asks user to fall back to latest supported verson if version is not compatible with device’s iOS version.
This commit is contained in:
@@ -570,9 +570,9 @@ extension AppManager
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
func update(_ installedApp: InstalledApp, presentingViewController: UIViewController?, context: AuthenticatedOperationContext = AuthenticatedOperationContext(), completionHandler: @escaping (Result<InstalledApp, Error>) -> Void) -> Progress
|
||||
func update(_ installedApp: InstalledApp, to version: AppVersion? = nil, presentingViewController: UIViewController?, context: AuthenticatedOperationContext = AuthenticatedOperationContext(), completionHandler: @escaping (Result<InstalledApp, Error>) -> Void) -> Progress
|
||||
{
|
||||
guard let appVersion = installedApp.storeApp?.latestSupportedVersion else {
|
||||
guard let appVersion = version ?? installedApp.storeApp?.latestSupportedVersion else {
|
||||
completionHandler(.failure(OperationError.appNotFound(name: installedApp.name)))
|
||||
return Progress.discreteProgress(totalUnitCount: 1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user