mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
Adds STAGING flag to conditionally use staging endpoint
This commit is contained in:
@@ -11,7 +11,12 @@ import CoreData
|
||||
extension Source
|
||||
{
|
||||
static let altStoreIdentifier = "com.rileytestut.AltStore"
|
||||
|
||||
#if STAGING
|
||||
static let altStoreSourceURL = URL(string: "https://f000.backblazeb2.com/file/altstore-staging/apps-staging.json")!
|
||||
#else
|
||||
static let altStoreSourceURL = URL(string: "https://cdn.altstore.io/file/altstore/apps.json")!
|
||||
#endif
|
||||
}
|
||||
|
||||
@objc(Source)
|
||||
|
||||
@@ -67,6 +67,11 @@ class FetchSourceOperation: ResultOperation<Source>
|
||||
decoder.managedObjectContext = context
|
||||
|
||||
let source = try decoder.decode(Source.self, from: data)
|
||||
|
||||
#if STAGING
|
||||
source.sourceURL = self.sourceURL
|
||||
#endif
|
||||
|
||||
self.finish(.success(source))
|
||||
}
|
||||
catch
|
||||
|
||||
Reference in New Issue
Block a user