Skip to main content
Question

[iOS SwiftUI] Unable to show paywall

  • May 15, 2024
  • 1 reply
  • 144 views

Forum|alt.badge.img+2

I have follow your guide to this page https://www.revenuecat.com/docs/tools/paywalls/displaying-paywalls

And implement the code in my view, but the paywall is not showing up, what am I missing?

```

            .presentPaywallIfNeeded(

                requiredEntitlementIdentifier: "pro",

                purchaseCompleted: { customerInfo in

                    print("Purchase completed: \(customerInfo.entitlements)")

                },

                restoreCompleted: { customerInfo in

                    // Paywall will be dismissed automatically if "pro" is now active.

                    print("Purchases restored: \(customerInfo.entitlements)")

                }

            )

```

 

This post has been closed for comments

1 reply

joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 313 replies
  • May 17, 2024

Hi @Zhou Haibo ,

 

I checked your projects and the issue seems to be that you don’t have any project with an entitlement called “pro”. You can check in your project settings in Entitlement your identifier and put it in your code.

 

Best,

Joan.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings