-
-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOs can purchase only if i invoke getSubscriptions first #283
Comments
In iOS, initConnection doesn't do anything. You should get subscription / production first. |
If youre right, then the buySubscription is checking the valid products in some data retrieved by getSubscriptions previously.. y though that buySubscription was checking against the AppleStore API. So i guess the module is handling the list of available products internally, in the app memory. Also, in Android i can purchase without invoke the getSubscriptions, so if youre right the API docs are a little bit confusing |
@dooboolab can you confirm that this is the correct behaviour? Thanks |
@marcosmartinez7 Yes, in ios, you should always |
Thanks! It tooks me a lot of time to realice that was the problem, because the "Invalid product id" has a lot of common causes :P it would be cool to add this to the docs too |
I've added Q & A section in readme. Will close this for now. |
Version 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:
This doesnt (throws invalid product id):
On android works fine both
The text was updated successfully, but these errors were encountered: