diff --git a/AltStore/Operations/DownloadAppOperation.swift b/AltStore/Operations/DownloadAppOperation.swift index d9f0a7a8..d4e975c5 100644 --- a/AltStore/Operations/DownloadAppOperation.swift +++ b/AltStore/Operations/DownloadAppOperation.swift @@ -32,7 +32,6 @@ final class DownloadAppOperation: ResultOperation self.appName = app.name self.bundleIdentifier = app.bundleIdentifier - self.sourceURL = app.url self.destinationURL = destinationURL super.init() diff --git a/AltStore/Operations/VerifyAppOperation.swift b/AltStore/Operations/VerifyAppOperation.swift index fa9789db..00c4ccf4 100644 --- a/AltStore/Operations/VerifyAppOperation.swift +++ b/AltStore/Operations/VerifyAppOperation.swift @@ -30,7 +30,7 @@ extension VerificationError VerificationError(code: .mismatchedBundleIdentifiers, app: app, sourceBundleID: sourceBundleID) } - static func iOSVersionNotSupported(app: ALTApplication, osVersion: OperatingSystemVersion = ProcessInfo.processInfo.operatingSystemVersion, requiredOSVersion: OperatingSystemVersion?) -> VerificationError { + static func iOSVersionNotSupported(app: AppProtocol, osVersion: OperatingSystemVersion = ProcessInfo.processInfo.operatingSystemVersion, requiredOSVersion: OperatingSystemVersion?) -> VerificationError { VerificationError(code: .iOSVersionNotSupported, app: app) } } diff --git a/AltStore/Types/Managed.swift b/AltStore/Types/Managed.swift index 7d4a48a2..2b150dfd 100644 --- a/AltStore/Types/Managed.swift +++ b/AltStore/Types/Managed.swift @@ -50,7 +50,7 @@ struct Managed return result } - + // Optionals subscript(dynamicMember keyPath: KeyPath) -> T? where ManagedObject == Optional { var result: T? diff --git a/AltStoreCore/Model/InstalledApp.swift b/AltStoreCore/Model/InstalledApp.swift index b577472e..e02e5c90 100644 --- a/AltStoreCore/Model/InstalledApp.swift +++ b/AltStoreCore/Model/InstalledApp.swift @@ -62,14 +62,14 @@ public class InstalledApp: NSManagedObject, InstalledAppProtocol @objc public var hasUpdate: Bool { if self.storeApp == nil { return false } - if self.storeApp!.latestVersion == nil { return false } - + if self.storeApp!.latestSupportedVersion == nil { return false } + let currentVersion = SemanticVersion(self.version) - let latestVersion = SemanticVersion(self.storeApp!.latestVersion!.version) - + let latestVersion = SemanticVersion(self.storeApp!.latestSupportedVersion!.version) + if currentVersion == nil || latestVersion == nil { // One of the versions is not valid SemVer, fall back to comparing the version strings by character - return self.version < self.storeApp!.latestVersion!.version + return self.version < self.storeApp!.latestSupportedVersion!.version } return currentVersion! < latestVersion!