IOs can purchase only if i invoke getSubscriptions first
See original GitHub issueVersion of react-native-iap
2.2.2
Platforms you faced the error (IOS or Android or both?)
IOS
Expected behavior
Should purchase the subscription
Actual behavior
I can only purchase if i invoke getSubscriptions first, otherwise, i get Invalid Product ID
Tested environment (Emulator? Real Device?)
Real device
Steps to reproduce the behavior
This works:
await RNIap.initConnection();
let subs =await RNIap.getSubscriptions(itemSkus);
console.warn(subs);
let purchase = await RNIap.buySubscription("someone");
This doesnt (throws invalid product id):
await RNIap.initConnection();
let purchase = await RNIap.buySubscription("someone");
On android works fine both
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Manage App Store purchases, subscriptions, settings, and ...
Manage App Store purchases, subscriptions, settings, and restrictions on iPhone. In the App Store app , you can manage subscriptions and review and...
Read more >React Native Android In App Purchase Error - Stack Overflow
On android Only - you need to open a connection to the billing service. This used to be RNIAP.prepare() , but it is...
Read more >react-native-iap - npm
In iOS, it will simply call canMakePayments method and return value. ... Buy a product without finish transaction call (iOS only).
Read more >API Reference | YouTube Data API - Google Developers
Note that a channel's sections are only visible if the channel ... code can be used as the value of the hl parameter...
Read more >Client SDK Reference - OneSignal Documentation
The removeExternalUserId method will not work unless the external_user_id is set first with the setExternalUserId method on Android. This is only applicable on ......
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
In iOS, initConnection doesn’t do anything. You should get subscription / production first. I think it’s the right response.
I’ve added Q & A section in readme. Will close this for now.