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