I am using the package react-native-admob
I created an alpha track of my app and created a managed product on the play console
If I try
RNIap.prepare()
I get the error
RNIap.prepare is not a function. (In 'RNIap.prepare()', 'RNIap.prepare' is undefined)
if I try
const itemSkus = Platform.select({
ios: [
my_product_id
],
android: [
my_product_id
]
});
const products = await RNIap.getProducts(itemSkus);
console.log(products)
I get
Array []
Is there any additional setup I'm missing? This is my first time working with in-app-purchases on react-native
I have been following along with this tutorial, but run into problems when I get to RNIap.prepare(). My app was using the Expo managed workflow, and is now using the bare workflow. I am still running my app with expo start, because I don't know what else I can do to run it.
Have you followed these steps in the document rn-iap? This was the document which i followed and implemnted in app purchase for both android and ios in react native. It explains easily and beautifully. Do check it out.
ps: Even my app is in production and it has succesfull in app purchase
You can't get RNIap.prepare() in android before first release in Google Play Store
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With