Skip to main content

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.entitlementss"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!

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