Skip to main content
Solved

Issues displaying different paywalls based on offerings swiftui

  • 4 September 2024
  • 1 reply
  • 11 views

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

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


Reply