in debug use local.plist setting for plan

sync_v2
Laurent 7 months ago
parent 73bf331a8b
commit b123b24927
  1. 18
      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] {

Loading…
Cancel
Save