Przeglądaj źródła

Fix paywall trial messaging and restore flow

Move free-trial copy/CTA to yearly plan, trigger in-app restore from paywall, and add a 3-day intro offer to the yearly StoreKit config.

Co-authored-by: Cursor <cursoragent@cursor.com>
huzaifahayat12 2 miesięcy temu
rodzic
commit
f0d734d4ee

+ 6 - 1
meetings_app/StoreKit.storekit

@@ -84,7 +84,12 @@
           "familyShareable" : false,
           "groupNumber" : 1,
           "internalID" : "C5694F51-47D8-4AFD-9D33-95A888527BB5",
-          "introductoryOffer" : null,
+          "introductoryOffer" : {
+            "internalID" : "TRIAL3D",
+            "numberOfPeriods" : 1,
+            "paymentMode" : "free",
+            "subscriptionPeriod" : "P3D"
+          },
           "localizations" : [
             {
               "description" : "Unlock premium features with yearly access.",

+ 7 - 6
meetings_app/ViewController.swift

@@ -2334,7 +2334,7 @@ private extension ViewController {
         case .manageSubscription:
             openManageSubscriptions()
         case .restorePurchase:
-            openRestoreSubscriptionPage()
+            performRestorePurchases()
         case .continueWithFreePlan:
             closePaywallClicked(nil)
         case .privacyPolicy:
@@ -2369,6 +2369,7 @@ private extension ViewController {
             applyPaywallPlanStyle(view, isSelected: plan == selectedPremiumPlan)
         }
         paywallOfferLabel?.stringValue = paywallOfferText(for: selectedPremiumPlan)
+        updatePaywallContinueState(isLoading: false)
     }
 
     private func paywallOfferText(for plan: PremiumPlan) -> String {
@@ -2405,9 +2406,9 @@ private extension ViewController {
         case .weekly:
             return "PKR 1,100.00/week"
         case .monthly:
-            return "PKR 2,500.00/month (3 days free trial)"
+            return "PKR 2,500.00/month"
         case .yearly:
-            return "PKR 9,900.00/year (about 190.38/week)"
+            return "PKR 9,900.00/year (3 days free trial)"
         case .lifetime:
             return "PKR 14,900.00 one-time purchase"
         }
@@ -2781,7 +2782,7 @@ private extension ViewController {
             paywallContinueButton?.alphaValue = 1.0
         } else {
             paywallContinueEnabled = true
-            paywallContinueLabel?.stringValue = "Continue"
+            paywallContinueLabel?.stringValue = (selectedPremiumPlan == .yearly) ? "Start with 3 day trial" : "Continue"
             paywallContinueButton?.alphaValue = 1.0
         }
     }
@@ -5845,7 +5846,7 @@ private extension ViewController {
             price: "PKR 2,500.00",
             badge: "Popular",
             badgeColor: NSColor(calibratedRed: 0.19, green: 0.82, blue: 0.39, alpha: 1),
-            subtitle: "3 days free trial",
+            subtitle: nil,
             plan: .monthly,
             strikePrice: nil
         )
@@ -5854,7 +5855,7 @@ private extension ViewController {
             price: "PKR 9,900.00",
             badge: "Best Value",
             badgeColor: NSColor(calibratedRed: 1.0, green: 0.60, blue: 0.20, alpha: 1),
-            subtitle: "190.38/week",
+            subtitle: "3 days free trial",
             plan: .yearly,
             strikePrice: nil
         )