From 5c5c741fba527b8ac5372cc2e50c6fa6938a8149 Mon Sep 17 00:00:00 2001 From: Razmig Sarkissian Date: Mon, 2 Sep 2024 21:23:08 +0200 Subject: [PATCH] fix release branch --- PadelClub/Utils/URLs.swift | 6 ++++++ PadelClub/Views/Tournament/Subscription/Guard.swift | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/PadelClub/Utils/URLs.swift b/PadelClub/Utils/URLs.swift index f83495b..beb49a7 100644 --- a/PadelClub/Utils/URLs.swift +++ b/PadelClub/Utils/URLs.swift @@ -9,9 +9,15 @@ import Foundation enum URLs: String, Identifiable { +#if DEBUG case activationHost = "xlr.alwaysdata.net" case main = "https://xlr.alwaysdata.net/" case api = "https://xlr.alwaysdata.net/roads/" +#else + case activationHost = "padelclub.app" + case main = "https://padelclub.app/" + case api = "https://padelclub.app/roads/" +#endif case subscriptions = "https://apple.co/2Th4vqI" case beachPadel = "https://beach-padel.app.fft.fr/beachja/index/" diff --git a/PadelClub/Views/Tournament/Subscription/Guard.swift b/PadelClub/Views/Tournament/Subscription/Guard.swift index d0eec4e..2a6db5f 100644 --- a/PadelClub/Views/Tournament/Subscription/Guard.swift +++ b/PadelClub/Views/Tournament/Subscription/Guard.swift @@ -140,7 +140,14 @@ import LeStorage } var currentPlan: StoreItem? { - return .monthlyUnlimited + #if DEBUG + return .monthlyUnlimited + #else + if let currentBestPlan = self.currentBestPlan, let plan = StoreItem(rawValue: currentBestPlan.productID) { + return plan + } + return nil + #endif } func userFilteredPurchases() -> [StoreKit.Transaction] {