Skip to main content
Question

Hide footerPaywall after buy ...

  • January 13, 2024
  • 1 reply
  • 198 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!

This post has been closed for comments

1 reply

Michael Fogel
Forum|alt.badge.img+6
  • Dedicated Contributor
  • 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!