mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Release channel support (#239)
* Release channel support - Show SideStore in Browse if it's not from the current SideStore source - Change SideStore source URL and source ID based on if beta and nightly are in the version string - Use StoreApp name for InstalledApp name to allow for source-specified name to show up in My Apps * My Apps: Fix incorrect app name on first launch * News: fix duplicate news items from multiple SideStore release channel sources * Trusted Sources: Add stable and beta
This commit is contained in:
@@ -108,6 +108,10 @@ public class InstalledApp: NSManagedObject, InstalledAppProtocol
|
||||
public func update(resignedApp: ALTApplication, certificateSerialNumber: String?)
|
||||
{
|
||||
self.name = resignedApp.name
|
||||
if storeApp != nil {
|
||||
// This might break things; maybe only do this if the bundle ID is SideStore's?
|
||||
self.name = storeApp!.name // If we don't do this, the name will always be SideStore in My Apps, even when using beta/nightly
|
||||
}
|
||||
|
||||
self.resignedBundleIdentifier = resignedApp.bundleIdentifier
|
||||
self.version = resignedApp.version
|
||||
@@ -178,7 +182,7 @@ public extension InstalledApp
|
||||
|
||||
class func fetchAltStore(in context: NSManagedObjectContext) -> InstalledApp?
|
||||
{
|
||||
let predicate = NSPredicate(format: "%K == %@", #keyPath(InstalledApp.bundleIdentifier), StoreApp.altstoreAppID)
|
||||
let predicate = NSPredicate(format: "%K == %@ AND %K != nil AND %K == %@", #keyPath(InstalledApp.bundleIdentifier), StoreApp.altstoreAppID, #keyPath(InstalledApp.storeApp), #keyPath(InstalledApp.storeApp.sourceIdentifier), Source.altStoreIdentifier)
|
||||
print("Fetch 'AltStore' Predicate: \(String(describing: predicate))")
|
||||
let altStore = InstalledApp.first(satisfying: predicate, in: context)
|
||||
return altStore
|
||||
|
||||
Reference in New Issue
Block a user