Skip to main content
Question

Hide footerPaywall after buy ...

  • 13 January 2024
  • 1 reply
  • 88 views

Forum|alt.badge.img+1

Hi I have a custom paywall in swiftUI with .paywallFooter() modifier. 

every screen check if the user is premium by a task:

    .task {
                        do {
                            let customerInfo = try await Purchases.shared.customerInfo()
                            isPremium = customerInfo.entitlements["Premium"]?.isActive       == true
                        } catch {
                            print(error.localizedDescription)
                        }

                    }

everything works fine, boughts, restore… but after you buy the paywall didn't disappear… if I change of tab and come back yes, paywallFooter is not there…

My footer paywall is implemented something like this:

 

         VStack{
                if isPremium{


                } else {
                    // more Code
                    Rectangle()
                    // ... Code...
                        .paywallFooter()
                     }}

maybe it is not correct...

thanks!

1 reply

Michael Fogel
Forum|alt.badge.img+6
  • Dedicated Contributor
  • 382 replies
  • January 17, 2024

Hey @gonrivas !

 

I would recommend checking out our documentation on more information on how to handle this here: https://www.revenuecat.com/docs/displaying-paywalls#how-to-display-a-footer-paywall-on-your-custom-paywall

 

You will want to check the customerInfo object when presenting the paywallFooter to check if the user has an entitlement or not. If the user has the entitlement, you will need to manually hide the footer. 

 

Hope that helps! 


Reply


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