Closed ovchinnikovs closed 2 years ago
Hey @ovchinnikovs, are you using react-native-iap@5.2.6? https://github.com/iaphub/react-native-iaphub#getting-started
Hey @iaphub yes, I using 5.2.6 version iap.
I install react-native-iap@8.0.4 latest version - android worked🙌 purchases come and even the subscription has passed but ios now have stopped working😥
Thereafter I do a downgrade to version 5.2.6 then the situation changes back ios worked but android does not work🤷
Ok weird. I do not know why the zza
method is failing on your app. We do not have this issue on our side and we never had this issue reported before.
Also the packageNameAndroid
property isn't even used by the IAPHUB library.
We're going to release pretty soon a library update that doesn't use react-native-iap as a dependency (so it'll fix your issue), in the meantime I would recommend just commenting the line adding packageNameAndroid
as a temporary fix (since it's not even used).
I'm closing the issue but you can since comment if you have any questions.
@iaphub packageNameAndroid
is used in the native module RNIapModule.java which uses the RNIap.getSubscriptions() method, you use this method for your productForSale()
Yes @ovchinnikovs I'm aware of that. You can install the version of react-native-iap below, it is the version 5.2.6 without the packageNameAndroid that is causing you an issue (for an unknown reason). It is probably the easiest solution for you until we release the next version of react-native-iaphub that won't use react-native-iap as a dependency.
npm install git://github.com/iaphub/react-native-iap.git#fix/package-name
I am trying to run Iaphub.getProductsForSale() on Android SDK 31 on a real device.
but the attempt fails.
I debugged the entire call chain and got to the RNIap.getSubscriptions() method, which breaks the call chain and returns nothing.
I investigated the call in this call to this method in the react-native-iap library and debugged the native RNIapModule.java module and found out that the method shown in the photo breaks the loop and breaks everything.
can you tell me what could be the problem? is it because react-native-iap is not installed correctly or because of json file configuration or testing environment is not correct?
P.S. IOS works is fine