First time user trying to setup RevenueCat. I am attempting to use `react-native-purchases` in an Expo app build using a dev-client approach (https://medium.com/@jonathan.payet/expo-in-app-purchase-for-managed-app-cdcd643de28d). I have it getting Offerings successfully in sandbox mode for iOS, but the result is empty on Android:
if (Platform.OS === 'ios') {
await Purchases.setup("appl_myactualkey");
} else if (Platform.OS === 'android') {
await Purchases.setup(`goog_myactualkey`);
} else {
console.error('Unknown OS type - Purchases will be broken!');
}
try {
const offerings = await Purchases.getOfferings();
console.error("RevenueCat: ", offerings);
// const products = await Purchases.getProducts();
// console.error("RevenueCat Products: ", products);
} catch (e) {
console.error(e);
}
Result on Android, on stdout:
RevenueCat: , Object {
"all": Object {},
"current": null,
}
However, if I use the REST API according to the docs:
curl --request GET \
> --url https://api.revenuecat.com/v1/subscribers/app_user_id/offerings \
> --header 'Accept: application/json' \
> --header 'Authorization: Bearer goog_myactualkey' \
> --header 'Content-Type: application/json' \
> --header 'X-Platform: android'
I get results!
{"current_offering_id":""redacted]","offerings":s{"description":""redacted]","identifier":""redacted]","packages":s{"identifier":"$rc_monthly","platform_product_identifier":""redacted]"}]},{"description":""redacted]","identifier":""redacted]","packages":s{"identifier":"$rc_annual","platform_product_identifier":""redacted]"}]}]}