[SOLVED] RNIap.getSubscriptions error : [TypeError: undefined is not an object (evaluating 'RNIapIos.getItems')]
See original GitHub issueVersion of react-native-iap
1.20
Platforms you faced the error (IOS or Android or both?)
tested on iOS only
Expected behavior
get list of subscriptions
Actual behavior
RNIap.getSubscriptions error : [TypeError: undefined is not an object (evaluating ‘RNIapIos.getItems’)]
Tested environment (Emulator? Real Device?)
both
Steps to reproduce the behavior
const itemSkus = Platform.select({
ios: [
'com.shares.sharesapp', // I also tried ['BASIC', 'CLASSIC', 'MAX', 'PLUS'] ..
],
android: [
'com.shares.sharesapp',
],
});
async componentDidMount() {
try {
await RNIap.prepare();
}
catch (err1) {
console.log("RNIap.prepare error : ", err1);
}
finally {
console.log("finally");
try {
const products = await RNIap.getSubscriptions(itemSkus);
console.log('Subscriptions', products);
}
catch (err) {
console.log("RNIap.getSubscriptions error : ", err);
}
}
}
I not able to connect with sandbox account in simulator
and in real device, having these popup
Here is the list of subscriptions in App Store Connect
Can someone please help me to setup this in good shape ?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
TypeError: undefined is not an object (evaluating 'subscription ...
In order to reproduce it, I have to refresh the app a few times, then I am getting this error. I tried googling...
Read more >Debugging E_IAP_NOT_AVAILABLE error #1010 - Issuehunt
initConnection returns false; getSubscriptions returns error: TypeError: null is not an object (evaluating RNIapIos.getItems); requestSubscriptions returns ...
Read more >How to use the react-native-iap.getProducts function in ... - Snyk
To help you get started, we've selected a few react-native-iap.getProducts examples, based on popular ways it is used in public projects.
Read more >React Native: undefined is not an object (evaluating '_this ...
React Native: undefined is not an object (evaluating '_this.props. ... I'm trying to use SectionList but I'm getting the following error:
Read more >Render Error undefined is not an Object (evaluating _react ...
In this video ,we fixed an error "Render Error undefined is not an Object ( evaluating _react.react .createElement)".
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had to manually install as described…
In 2022, the products fetch this way: // simple productIDs without bundle identifier. let allSkus={ skus:[ ‘productID1’, ‘productID2’, ] }