From c938023483beb5f60edd0712a84941b877cbd0a9 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Sat, 2 Nov 2019 11:42:33 +0100 Subject: [PATCH] Infer beta build from App Store receipt URL --- Passepartout-iOS/Global/AppConstants+Flags.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Passepartout-iOS/Global/AppConstants+Flags.swift b/Passepartout-iOS/Global/AppConstants+Flags.swift index 36805328..2ceedb40 100644 --- a/Passepartout-iOS/Global/AppConstants+Flags.swift +++ b/Passepartout-iOS/Global/AppConstants+Flags.swift @@ -28,7 +28,13 @@ import PassepartoutCore extension AppConstants { class Flags { - static var isBeta = false + static var isBeta: Bool { + #if targetEnvironment(simulator) + return true + #else + return Bundle.main.appStoreReceiptURL?.lastPathComponent == "sandboxReceipt" + #endif + } static var isMockVPN = false { didSet {