Skip to main content
Answer

Issues displaying different paywalls based on offerings swiftui

  • September 4, 2024
  • 1 reply
  • 112 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. 

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.