When I try to query Purchases.getOfferings it results in an error
const getPackages = async () => {
try {
const offerings = await Purchases.getOfferings();
if (
offerings.current !== null &&
offerings.current.availablePackages.length !== 0
) {
setPackages(offerings.current.availablePackages);
}
} catch (e) {
Alert.alert('Error getting offers', e.message);
}
};
getPackages();
What have I done so far?
- I have my EAS local device & simulator build with
bundleIdentifier
: com.myapp.dev- this includes installing the RevenueCat SDK
- I have TestFlight App setup with my
bundleIdentifier
: com.myapp.production - Following the Product setup Guide, inside TestFlight App, I have my subscription group "Core" setup
- Inside Core subscription group, I have my "Subscriptions" added: Monthly & Annual which show in "Ready to Submit" status
- I setup my Revenue Cat API
- Inside Revenue Cat, I added Product. I was able to use the automated Import from the Subscription items I set in test flight
- Then I created an Offering which includes my 2 subscriptions
- Then I created an Entitlement which includes the 2 products
It seems like if my products were automatically imported from TestFlight into RevenueCat, then the configuration appears correct?
I also tried adding a Sandbox Tester inside test flight, but I dont think has made any difference.
This is the official response from Revenue Cat about how to handle this error, which I have triple checked: https://community.revenuecat.com/sdks-51/why-are-offerings-or-products-empty-124
Any ideas?
what about the bundle identity between dev & TestFlight prod?