I am following this library to implement In App Purchase for react native project.
Project info:-
inside package.json
"dependencies": {
"react": "16.11.0",
"react-native": "0.61.5",
"react-native-iap": "^4.4.9"
},
And I am trying to get product list,
import * as RNIap from 'react-native-iap';
const itemSkus = Platform.select({
ios: [
'com.cooni.point1000',
'com.cooni.point5000', // dooboolab
],
android: [
'com.example.coins100'
]
});
try {
const result = await RNIap.initConnection();
await RNIap.consumeAllItemsAndroid();
console.log('result', result);
if(result == true){
console.log("itemSkus>>>", itemSkus)
const products = await RNIap.getSubscriptions(itemSkus);
console.log("getting_products>>>", products)
this.setState({ products });
}
} catch(err) {
console.warn(err); // standardized err.code and err.message available
}
I am getting true for initConnection but getting [] (empty array) for getSubscriptions and also for getProducts()
By the way, I am getting empty array also for project which is in testFlight for using subscription ids that I have created. Those are in "Waiting for review state"
Is it not possible to get result using above test iap ids and ids that are in "Waiting for review state"?
How can I get response either using example or real ids?
Any help should be appreciable.