dooboolab-community / react-native-iap

In App Purchase module for React Native!
https://react-native-iap.dooboolab.com
MIT License
2.81k stars 641 forks source link

StoreKit2: It seems that the Sk1 module is also listening to purchases when using STOREKIT2_MODE #2332

Open andresesfm opened 1 year ago

andresesfm commented 1 year ago

Discussed in https://github.com/dooboolab/react-native-iap/discussions/2295

Originally posted by **zarv1k** March 14, 2023 Hi there! Using `STOREKIT2_MODE` I noticed some debug logs like the following: ``` [react-native-iap] Purchase Successful [react-native-iap] requestReceiptDataWithBlock with force refresh: NO ``` So it seems that Sk1 module is still in use even the `STOREKIT2_MODE` is enabled. Is it expected behaviour? As for me no, It's not normal. I'd like to expect that I'm using the Sk2 mode only. May be I'm wrong but I think it happens because there is a call of addTransactionObserver() at the constructor of RNIapIos module (`RNIapIos.init()`). Any thoughts on that? @andresesfm
kaancembertas commented 1 year ago

@andresesfm We have suffered from this issue. Our analytics event has sent dublicately because of this issue. I think it should not be the expected behaviour. I'm gonna fix this issue on our end. May be we can discuss about which solutions can be applied.

andresesfm commented 1 year ago

If you can, please create a PR

Prathameshlabde commented 1 year ago

https://github.com/dooboolab-community/react-native-iap/issues/2455 Can anyone please suggest on this issue Please ?