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