Question

[iOS SwiftUI] Unable to show paywall

  • 15 May 2024
  • 1 reply
  • 19 views

Badge +1

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

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.