Merge branch 'beta-flags'

This commit is contained in:
Davide De Rosa 2019-11-02 11:49:26 +01:00
commit 9a3aef36d1
2 changed files with 10 additions and 2 deletions

View File

@ -28,7 +28,15 @@ 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 isBetaFullVersion = false
static var isMockVPN = false {
didSet {

View File

@ -140,7 +140,7 @@ class ProductManager: NSObject {
}
func isFullVersion() -> Bool {
guard !AppConstants.Flags.isBeta else {
if AppConstants.Flags.isBeta && AppConstants.Flags.isBetaFullVersion {
return true
}
return purchasedFeatures.contains(.fullVersion)