From b3214cca7bfb0b4747f8ddd2a2c543146f71de14 Mon Sep 17 00:00:00 2001 From: Laurent Date: Fri, 4 Apr 2025 09:56:10 +0200 Subject: [PATCH 1/3] clean up purchase api calls again --- PadelClub/Utils/Patcher.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)" From 73bf331a8b4a7310229ff9b977b52caf556597cc Mon Sep 17 00:00:00 2001 From: Laurent Date: Fri, 4 Apr 2025 09:56:22 +0200 Subject: [PATCH 2/3] Bumps build number to 3 --- PadelClub.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PadelClub.xcodeproj/project.pbxproj b/PadelClub.xcodeproj/project.pbxproj index f698f46..030e62a 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; From b123b249278d4d6d2df71c40ef3dbb8b2b95812e Mon Sep 17 00:00:00 2001 From: Laurent Date: Fri, 4 Apr 2025 19:10:28 +0200 Subject: [PATCH 3/3] in debug use local.plist setting for plan --- .../Views/Tournament/Subscription/Guard.swift | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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] {