Question

[iOS SwiftUI] Unable to show paywall

  • 15 May 2024
  • 1 reply
  • 52 views

Badge +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

Badge +4

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.