Sen descrición

SubscriptionProductIDs.swift 900B

123456789101112131415161718192021222324252627
  1. //
  2. // SubscriptionProductIDs.swift
  3. // App for Indeed
  4. //
  5. import Foundation
  6. /// Identifiers for auto-renewable subscriptions in App Store Connect.
  7. /// Local Xcode runs use `App for Indeed/ProSubscriptions.storekit` (selected in the Run scheme → Options → StoreKit Configuration).
  8. /// Create three subscriptions with these exact IDs and attach them to the same subscription group.
  9. enum SubscriptionProductIDs {
  10. static let weekly = "com.mqldev.appforindeed.pro.weekly"
  11. static let monthly = "com.mqldev.appforindeed.pro.monthly"
  12. static let yearly = "com.mqldev.appforindeed.pro.yearly"
  13. static let all: [String] = [weekly, monthly, yearly]
  14. static func productID(planKey: String) -> String? {
  15. switch planKey {
  16. case "weekly": return weekly
  17. case "monthly": return monthly
  18. case "yearly": return yearly
  19. default: return nil
  20. }
  21. }
  22. }