|
@@ -782,26 +782,36 @@ private extension ViewController {
|
|
|
}
|
|
}
|
|
|
let productID = PremiumStoreProduct.productID(for: plan)
|
|
let productID = PremiumStoreProduct.productID(for: plan)
|
|
|
if let product = storeKitCoordinator.productsByID[productID] {
|
|
if let product = storeKitCoordinator.productsByID[productID] {
|
|
|
|
|
+ let pkrPrice = pkrDisplayPrice(product.displayPrice)
|
|
|
if product.type == .nonConsumable {
|
|
if product.type == .nonConsumable {
|
|
|
- return "\(product.displayPrice) one-time purchase"
|
|
|
|
|
|
|
+ return "\(pkrPrice) one-time purchase"
|
|
|
}
|
|
}
|
|
|
if let period = product.subscription?.subscriptionPeriod {
|
|
if let period = product.subscription?.subscriptionPeriod {
|
|
|
- return "\(product.displayPrice)/\(subscriptionUnitText(period.unit))"
|
|
|
|
|
|
|
+ return "\(pkrPrice)/\(subscriptionUnitText(period.unit))"
|
|
|
}
|
|
}
|
|
|
- return product.displayPrice
|
|
|
|
|
|
|
+ return pkrPrice
|
|
|
}
|
|
}
|
|
|
switch plan {
|
|
switch plan {
|
|
|
case .weekly:
|
|
case .weekly:
|
|
|
- return "Rs 1,100.00/week"
|
|
|
|
|
|
|
+ return "PKR 1,100.00/week"
|
|
|
case .monthly:
|
|
case .monthly:
|
|
|
- return "Free for 3 Days then Rs 2,500.00/month"
|
|
|
|
|
|
|
+ return "Free for 3 Days then PKR 2,500.00/month"
|
|
|
case .yearly:
|
|
case .yearly:
|
|
|
- return "Rs 9,900.00/year (about 190.38/week)"
|
|
|
|
|
|
|
+ return "PKR 9,900.00/year (about 190.38/week)"
|
|
|
case .lifetime:
|
|
case .lifetime:
|
|
|
- return "Rs 14,900.00 one-time purchase"
|
|
|
|
|
|
|
+ return "PKR 14,900.00 one-time purchase"
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private func pkrDisplayPrice(_ value: String) -> String {
|
|
|
|
|
+ if value.hasPrefix("PKR ") { return value }
|
|
|
|
|
+ if value.hasPrefix("Rs ") {
|
|
|
|
|
+ return "PKR " + value.dropFirst(3)
|
|
|
|
|
+ }
|
|
|
|
|
+ if value.contains("PKR") { return value }
|
|
|
|
|
+ return "PKR \(value)"
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private func subscriptionUnitText(_ unit: Product.SubscriptionPeriod.Unit) -> String {
|
|
private func subscriptionUnitText(_ unit: Product.SubscriptionPeriod.Unit) -> String {
|
|
|
switch unit {
|
|
switch unit {
|
|
|
case .day: return "day"
|
|
case .day: return "day"
|
|
@@ -825,14 +835,14 @@ private extension ViewController {
|
|
|
for (plan, label) in paywallPriceLabels {
|
|
for (plan, label) in paywallPriceLabels {
|
|
|
let productID = PremiumStoreProduct.productID(for: plan)
|
|
let productID = PremiumStoreProduct.productID(for: plan)
|
|
|
if let product = storeKitCoordinator.productsByID[productID] {
|
|
if let product = storeKitCoordinator.productsByID[productID] {
|
|
|
- label.stringValue = product.displayPrice
|
|
|
|
|
|
|
+ label.stringValue = pkrDisplayPrice(product.displayPrice)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
for (plan, label) in paywallSubtitleLabels {
|
|
for (plan, label) in paywallSubtitleLabels {
|
|
|
let productID = PremiumStoreProduct.productID(for: plan)
|
|
let productID = PremiumStoreProduct.productID(for: plan)
|
|
|
guard let product = storeKitCoordinator.productsByID[productID],
|
|
guard let product = storeKitCoordinator.productsByID[productID],
|
|
|
let period = product.subscription?.subscriptionPeriod else { continue }
|
|
let period = product.subscription?.subscriptionPeriod else { continue }
|
|
|
- label.stringValue = "\(product.displayPrice)/\(subscriptionUnitText(period.unit))"
|
|
|
|
|
|
|
+ label.stringValue = "\(pkrDisplayPrice(product.displayPrice))/\(subscriptionUnitText(period.unit))"
|
|
|
}
|
|
}
|
|
|
updatePaywallPlanSelection()
|
|
updatePaywallPlanSelection()
|
|
|
updatePaywallContinueState(isLoading: false)
|
|
updatePaywallContinueState(isLoading: false)
|
|
@@ -1512,7 +1522,7 @@ private extension ViewController {
|
|
|
|
|
|
|
|
let weeklyCard = paywallPlanCard(
|
|
let weeklyCard = paywallPlanCard(
|
|
|
title: "Weekly",
|
|
title: "Weekly",
|
|
|
- price: "Rs 1,100.00",
|
|
|
|
|
|
|
+ price: "PKR 1,100.00",
|
|
|
badge: "Basic Deal",
|
|
badge: "Basic Deal",
|
|
|
badgeColor: NSColor(calibratedRed: 1.0, green: 0.60, blue: 0.20, alpha: 1),
|
|
badgeColor: NSColor(calibratedRed: 1.0, green: 0.60, blue: 0.20, alpha: 1),
|
|
|
subtitle: nil,
|
|
subtitle: nil,
|
|
@@ -1523,7 +1533,7 @@ private extension ViewController {
|
|
|
|
|
|
|
|
let monthlyCard = paywallPlanCard(
|
|
let monthlyCard = paywallPlanCard(
|
|
|
title: "Monthly",
|
|
title: "Monthly",
|
|
|
- price: "Rs 2,500.00",
|
|
|
|
|
|
|
+ price: "PKR 2,500.00",
|
|
|
badge: "Free Trial",
|
|
badge: "Free Trial",
|
|
|
badgeColor: NSColor(calibratedRed: 0.19, green: 0.82, blue: 0.39, alpha: 1),
|
|
badgeColor: NSColor(calibratedRed: 0.19, green: 0.82, blue: 0.39, alpha: 1),
|
|
|
subtitle: "625.00/week",
|
|
subtitle: "625.00/week",
|
|
@@ -1534,7 +1544,7 @@ private extension ViewController {
|
|
|
|
|
|
|
|
let yearlyCard = paywallPlanCard(
|
|
let yearlyCard = paywallPlanCard(
|
|
|
title: "Yearly",
|
|
title: "Yearly",
|
|
|
- price: "Rs 9,900.00",
|
|
|
|
|
|
|
+ price: "PKR 9,900.00",
|
|
|
badge: "Best Deal",
|
|
badge: "Best Deal",
|
|
|
badgeColor: NSColor(calibratedRed: 1.0, green: 0.60, blue: 0.20, alpha: 1),
|
|
badgeColor: NSColor(calibratedRed: 1.0, green: 0.60, blue: 0.20, alpha: 1),
|
|
|
subtitle: "190.38/week",
|
|
subtitle: "190.38/week",
|
|
@@ -1545,12 +1555,12 @@ private extension ViewController {
|
|
|
|
|
|
|
|
let lifetimeCard = paywallPlanCard(
|
|
let lifetimeCard = paywallPlanCard(
|
|
|
title: "Lifetime",
|
|
title: "Lifetime",
|
|
|
- price: "Rs 14,900.00",
|
|
|
|
|
|
|
+ price: "PKR 14,900.00",
|
|
|
badge: "Save 50%",
|
|
badge: "Save 50%",
|
|
|
badgeColor: NSColor(calibratedRed: 1.0, green: 0.60, blue: 0.20, alpha: 1),
|
|
badgeColor: NSColor(calibratedRed: 1.0, green: 0.60, blue: 0.20, alpha: 1),
|
|
|
subtitle: nil,
|
|
subtitle: nil,
|
|
|
plan: .lifetime,
|
|
plan: .lifetime,
|
|
|
- strikePrice: "Rs 29,800.00"
|
|
|
|
|
|
|
+ strikePrice: "PKR 29,800.00"
|
|
|
)
|
|
)
|
|
|
contentStack.addArrangedSubview(lifetimeCard)
|
|
contentStack.addArrangedSubview(lifetimeCard)
|
|
|
updatePaywallPlanSelection()
|
|
updatePaywallPlanSelection()
|