Skip to main content
Question

Select Paywall iOS

  • November 29, 2023
  • 2 replies
  • 141 views

Forum|alt.badge.img+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!

This post has been closed for comments

2 replies

cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 501 replies
  • December 1, 2023

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)

 


Forum|alt.badge.img+3
  • Author
  • New Member
  • 2 replies
  • December 1, 2023

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


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