Displaying different paywalls based on offering

  • 16 January 2024
  • 2 replies

Badge +1

Hi all, I could not find this in the docs. I have 2 different paywalls and 2 different offerings. How do I call up a specific paywall within the app vs the other using UKIT or Swift/IOS? Thanks!


Best answer by cody 18 January 2024, 15:33

View original

2 replies

Userlevel 6
Badge +8

Hey @krishdtech-3e6383!

When using UIKit, you can pass an `offering` to the PaywallViewController initializer after fetching your offerings like this:

func openPaywall() async throws {
let offerings = try await Purchases.shared.offerings()
let myCustomOffering = offerings.offering(identifier: "customerOfferingIdentifier")

let paywall = PaywallViewController(offering: myCustomOffering, displayCloseButton: true)
self.present(paywall, animated: true)


Badge +1

Thanks that works!