You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also tried to call getSubscriptions and getPurchaseHistory using the same product ID without issue. The getSubscriptions will return the subscription details while getPurchaseHistory return empty array as there is no existing purchase. I am using the user ID in the sandbox testers. On Android device all function works well.
The text was updated successfully, but these errors were encountered:
Managed to find out the issue after dig into the ios code RNIapIos.m. I need to call the getSubscriptions() before calling buySubscription(). The reason is there is a variable "validProducts" that need to fill with product data before I can call buySubscription(). Seem like this sequence didn't specify in the README.md.
Version of react-native-iap
1.2.1
Platforms you faced the error
IOS
Expected behavior
Return the subscription details.
Actual behavior
Return E_DEVELOPER_ERROR error as below
Tested environment
Both in iOS emulator and real device
Steps to reproduce the behavior
Below is my portion of code that caused the issue when execute.
I also tried to call getSubscriptions and getPurchaseHistory using the same product ID without issue. The getSubscriptions will return the subscription details while getPurchaseHistory return empty array as there is no existing purchase. I am using the user ID in the sandbox testers. On Android device all function works well.
The text was updated successfully, but these errors were encountered: