From 1ae8d336be8e2c48d6f33bb2d0f8897e97b1569c Mon Sep 17 00:00:00 2001 From: nythepegasus Date: Thu, 9 May 2024 01:46:19 -0400 Subject: [PATCH] Removes unnecessary StoreApp convenience properties --- AltStoreCore/Model/StoreApp.swift | 25 ------------------------ AltStoreCore/Protocols/AppProtocol.swift | 2 +- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/AltStoreCore/Model/StoreApp.swift b/AltStoreCore/Model/StoreApp.swift index f1c821ce..6a973a28 100644 --- a/AltStoreCore/Model/StoreApp.swift +++ b/AltStoreCore/Model/StoreApp.swift @@ -169,31 +169,6 @@ public class StoreApp: NSManagedObject, Decodable, Fetchable return self._versions.array as! [AppVersion] } - @nonobjc public var size: Int64? { - guard let version = self.latestVersion else { return nil } - return version.size - } - - @nonobjc public var version: String? { - guard let version = self.latestVersion else { return nil } - return version.version - } - - @nonobjc public var versionDescription: String? { - guard let version = self.latestVersion else { return nil } - return version.localizedDescription - } - - @nonobjc public var versionDate: Date? { - guard let version = self.latestVersion else { return nil } - return version.date - } - - @nonobjc public var downloadURL: URL? { - guard let version = self.latestVersion else { return nil } - return version.downloadURL - } - private override init(entity: NSEntityDescription, insertInto context: NSManagedObjectContext?) { super.init(entity: entity, insertInto: context) diff --git a/AltStoreCore/Protocols/AppProtocol.swift b/AltStoreCore/Protocols/AppProtocol.swift index 7438044c..8b622933 100644 --- a/AltStoreCore/Protocols/AppProtocol.swift +++ b/AltStoreCore/Protocols/AppProtocol.swift @@ -40,7 +40,7 @@ extension ALTApplication: AppProtocol extension StoreApp: AppProtocol { public var url: URL? { - return self.downloadURL + return self.latestAvailableVersion?.downloadURL } }