diff --git a/PadelClub.xcodeproj/project.pbxproj b/PadelClub.xcodeproj/project.pbxproj index 474b376..260e5ab 100644 --- a/PadelClub.xcodeproj/project.pbxproj +++ b/PadelClub.xcodeproj/project.pbxproj @@ -3640,7 +3640,7 @@ CODE_SIGN_ENTITLEMENTS = PadelClub/PadelClub.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 3; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\""; @@ -3686,7 +3686,7 @@ CODE_SIGN_ENTITLEMENTS = PadelClub/PadelClub.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 3; DEFINES_MODULE = YES; DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\""; DEVELOPMENT_TEAM = BQ3Y44M3Q6; diff --git a/PadelClub/Utils/Patcher.swift b/PadelClub/Utils/Patcher.swift index 8bde529..f5812cf 100644 --- a/PadelClub/Utils/Patcher.swift +++ b/PadelClub/Utils/Patcher.swift @@ -54,7 +54,7 @@ enum Patch: String, CaseIterable { case cleanLogs case syncUpgrade case updateTournaments - case cleanPurchaseApiCalls + case cleanPurchaseApiCalls = "cleanPurchaseApiCalls_2" var id: String { return "padelclub.app.patch.\(self.rawValue)" diff --git a/PadelClub/Views/Tournament/Subscription/Guard.swift b/PadelClub/Views/Tournament/Subscription/Guard.swift index 570ccc7..77106fa 100644 --- a/PadelClub/Views/Tournament/Subscription/Guard.swift +++ b/PadelClub/Views/Tournament/Subscription/Guard.swift @@ -187,18 +187,20 @@ import LeStorage } var currentPlan: StoreItem? { -// #if DEBUG -// return .monthlyUnlimited -// #elseif TESTFLIGHT -// return .monthlyUnlimited -// #elseif PRODTEST -// return .monthlyUnlimited -// #else + #if DEBUG + if let plan = PListReader.readString(plist: "local", key: "plan"), !plan.isEmpty { + return StoreItem(rawValue: plan) + } + #elseif TESTFLIGHT + return .monthlyUnlimited + #elseif PRODTEST + return .monthlyUnlimited + #else if let currentBestPurchase = self.currentBestPurchase, let plan = StoreItem(rawValue: currentBestPurchase.productId) { return plan } + #endif return nil -// #endif } func userFilteredPurchases() -> [StoreKit.Transaction] {