[Beta-Updates]: Added beta update check feature

This commit is contained in:
Magesh K
2024-12-17 21:01:33 +05:30
parent a173455e2d
commit 901b9ae337
7 changed files with 125 additions and 47 deletions

View File

@@ -47,6 +47,7 @@ public class AppVersion: NSManagedObject, Decodable, Fetchable
@NSManaged public var appBundleID: String
@NSManaged public var sourceID: String?
@NSManaged public var isBeta: Bool
@NSManaged public var commitID: String?
/* Relationships */
@NSManaged public private(set) var app: StoreApp?
@@ -69,6 +70,7 @@ public class AppVersion: NSManagedObject, Decodable, Fetchable
case minOSVersion
case maxOSVersion
case isBeta
case commitID
}
public required init(from decoder: Decoder) throws
@@ -91,9 +93,11 @@ public class AppVersion: NSManagedObject, Decodable, Fetchable
self.size = try container.decode(Int64.self, forKey: .size)
self.sha256 = try container.decodeIfPresent(String.self, forKey: .sha256)?.lowercased()
self._minOSVersion = try container.decodeIfPresent(String.self, forKey: .minOSVersion)
self._maxOSVersion = try container.decodeIfPresent(String.self, forKey: .maxOSVersion)
// self.isBeta = try container.decodeIfPresent(Bool.self, forKey: .isBeta) ?? false
// self.commitID = try container.decodeIfPresent(String.self, forKey: .commitID)
}
catch
{