Hey @Ray Hwang !
Offer metadata works on the React-Native SDK as well so long as you are on version 6.0.0 and up. Which version of the RevenueCat SDK are you using? To access metadata in react-native, your code should look something like the snippet below:
const offerings = await Purchases.getOfferings();
const current = offerings.current;
if (current) {
const metadata = offerings.current || {};
const showNewBenefits = metadata.show_new_benefits;
const title = metadata.title_stringsg"en_US"];
const cta = metadata.cta_stringsg"en_US"];
}
Our paywalls work differently from the metadata, our paywalls will display a certain paywalls to a user specifically based on which offering they are displayed. More info on this can be found here: https://www.revenuecat.com/docs/tools/paywalls
Currently you cannot access the metadata the same way with our paywalls built in the RevenueCatUI.
Hi @Michael Fogel thanks for responding!
Sorry for not being clearer - I can and have been accessing the metadata from within the client. I am using the metadata to render bits and bobs for the products I am upselling.
The question is about if I can use the metadata to directly change how the Paywall is rendered, more specifically, the ones from RevenueCatUI.PaywallFooterContainerView/RevenueCatUI.presentPaywall().
Ray.
Hi Ray,
At this time, you can’t use Offering metadata with our Paywalls feature. Instead, you would need to create a flexible paywall in code (example') that is reactive to the metadata.