From 3ba1669e515f2007b6ef6013094752a25b885a31 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Wed, 13 Nov 2019 11:35:37 -0800 Subject: [PATCH] [AltServer] Adds STAGING flag to conditionally download Delta version --- AltServer/Devices/ALTDeviceManager+Installation.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/AltServer/Devices/ALTDeviceManager+Installation.swift b/AltServer/Devices/ALTDeviceManager+Installation.swift index bb7b9035..9a69e8f9 100644 --- a/AltServer/Devices/ALTDeviceManager+Installation.swift +++ b/AltServer/Devices/ALTDeviceManager+Installation.swift @@ -9,6 +9,12 @@ import Cocoa import UserNotifications +#if STAGING +private let appURL = URL(string: "https://f000.backblazeb2.com/file/altstore-staging/altstore.ipa")! +#else +private let appURL = URL(string: "https://f000.backblazeb2.com/file/altstore/altstore.ipa")! +#endif + enum InstallError: LocalizedError { case cancelled @@ -167,8 +173,6 @@ extension ALTDeviceManager func downloadApp(completionHandler: @escaping (Result) -> Void) { - let appURL = URL(string: "https://f000.backblazeb2.com/file/altstore/altstore.ipa")! - let downloadTask = URLSession.shared.downloadTask(with: appURL) { (fileURL, response, error) in do {