how to set activityIndicator loading before IAP sheets pop up?
Version of react-native-iap
3.3.9
Version of react-native
59.9.6
Platforms you faced the error (IOS or Android or both?)
Both
Expected behavior
set a loading modal(activityIndicator) while payment sheet going to pop up and alos set this loading after user confirm to pay and remove it if user cancel the purchase.
Tested environment (Emulator? Real Device?)
real device
I need to show user that he/she need to wait until payment sheet shows up, so I want to use a simle loader component for this purpose but I dont know how to stop it if user cancel payment, by default when use press the buy button I will show my loading component bu I need to know if user cancel payment I remove the loader.
In that use case, you can stop loading when something happens in the purchaseErrorListener
If a user cancels, an event will trigger. And purchaseErrorListener listens for that event.
A cancel will result in "Cannot connect to iTunes Store". This is a bit of a crap message to work with for what actually happens...
Thanks, that works