Skip to main content
Solved

Issues displaying different paywalls based on offerings swiftui

  • September 4, 2024
  • 1 reply
  • 56 views

Forum|alt.badge.img+2

Hi there,

I am currently display my default paywall using .sheet & PaywallView() however I am having issues with the view refusing to compile if I attempt to add PaywallView(offerings:) parameter.

In my class that connects to the sdk I have tried adding: 

Purchases.shared.getOfferings { (offerings, error) in
            if let packages = offerings?.offering(identifier: "experiment_group")?.availablePackages {
                self.display(packages)
            }
        }

 

but with this I just get the error that no member “display” exists, no matter what I do.

Have I missed something? I’m still very new to paywalls so please excuse my lack of experience. I should add, I am targeting iOS 17 & using SwiftUI.

 

Many Thanks, Billie

Best answer by thecodingsprite

My bad, I’ve worked it out. My sheet was using isPresented instead of item int he parameters. 

View original
Did this post help you find an answer to your question?
This post has been closed for comments

1 reply

Forum|alt.badge.img+2

My bad, I’ve worked it out. My sheet was using isPresented instead of item int he parameters. 


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