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] {