AppStoreConfig.swift 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. import Foundation
  2. /// Production App Store identifiers for Printer App - All Printers.
  3. /// Product IDs are sourced from bundled `paywall.json`.
  4. enum AppStoreConfig {
  5. static let displayName = "Printer App - All Printers"
  6. static let proDisplayName = "\(displayName) Pro"
  7. static let bundleIdentifier = "com.printer-app-all-printers"
  8. /// Numeric Mac App Store ID from App Store Connect (General → App Information → Apple ID).
  9. static let appStoreID = "6785834649"
  10. /// Mac App Store listing URL.
  11. static var appStoreURL: URL? {
  12. guard !appStoreID.isEmpty else { return nil }
  13. return URL(string: "https://apps.apple.com/app/id\(appStoreID)")
  14. }
  15. /// Direct write-review link for the manual Settings action.
  16. static var appStoreReviewURL: URL? {
  17. guard !appStoreID.isEmpty else { return nil }
  18. return URL(string: "https://apps.apple.com/app/id\(appStoreID)?action=write-review")
  19. }
  20. enum ProductID {
  21. private static let paywallConfig = PaywallConfig.loadBundled()
  22. static let monthly = paywallConfig.plans.monthly.productID
  23. static let yearly = paywallConfig.plans.yearly.productID
  24. static let lifetime = paywallConfig.plans.lifetime.productID
  25. static let all: Set<String> = [monthly, yearly, lifetime]
  26. }
  27. }