Question

Select Paywall iOS

  • 29 November 2023
  • 2 replies
  • 37 views

Badge +3

Hi!


I have 2 paywalls configured - one with subscriptions and one with consumables. 

Is it possible to select which paywall to present using RevenueCatUI? Or the "default" one will always be presented?

I would like to use them both (not in an experiment) - in different parts of the app.

 

Thanks!


2 replies

Userlevel 6
Badge +8

Hey @Marcio!

By default, the ‘current’ offering’s paywall is presented. However, when calling `presentPaywallIfNeeded`, or initializing a PaywallView, there’s a parameter to pass an offering that you retrieve from `getOfferings`:

Purchases.shared.getOfferings { offerings, error in
if let myOffering = offerings?.offering(identifier: "my_offering_id") {
// do something with a specific offering
}
// or fall back to offerings.current by default
}
PaywallView(offering: myOffering)

// or

MyView()
.presentPaywallIfNeeded(requiredEntitlementIdentifier: "entitlement_id", offering: myOffering)

 

Badge +3

Great, thanks! I am currently using `paywallFooter` so I guess I need to change it to use one of the other options. 

Reply