SubscriptionProductID.swift 486 B

123456789101112131415161718
  1. import Foundation
  2. enum SubscriptionProductID {
  3. static let monthly = "com.reddora.pro.monthly"
  4. static let yearly = "com.reddora.pro.yearly"
  5. static let lifetime = "com.reddora.pro.lifetime"
  6. static let all: Set<String> = [monthly, yearly, lifetime]
  7. static func plan(for productID: String) -> PaywallPlan? {
  8. switch productID {
  9. case monthly: .monthly
  10. case yearly: .yearly
  11. case lifetime: .lifetime
  12. default: nil
  13. }
  14. }
  15. }