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
requestSubscription promise is not resolved #984
Comments
We recommend this to be handled in |
@hyochan Resolving the promise would create a consistent api as |
hyochan is correct, you must support support the purchaseUpdated event because if something fails the receipt could be triggered later, like when restarting the app. Resolving a promise after the purchaseUpdated event is triggered (to make things easier like showing a spinner) is possible though, it is supported in react-native-iaphub |
I believe this is down to the same problem as #985. The promise does resolve in v4.4.3 of the library and the purchaseUpdated event fires, but in any later version (up to 4.4.8), neither happens. |
Thanks for both of your replies. @maxs15 the purchase is handled by the purchaseUpdated handler but since it is an event handler it is not bound to the component, so implementing the spinner with the event handler requires more effort, how much is depending on the app architecture. @marnusw Could be related. I am running v4.4.3 and it is not working for me there either. |
Does anyone have an example of how best to show a loading icon when purchasing? It seems quite complex to do this in the purchaseUpdateSubscription? |
Any update on how best to show a loader whilst waiting for the purchase to complete? |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
Version of react-native-iap
4.4.6
Version of react-native
0.61.5
Platforms you faced the error (IOS or Android or both?)
ios
Expected behavior
requestSubscription
promise is resolvedActual behavior
requestSubscription
promise never resolvedTested environment (Emulator? Real Device?)
Real Device
Steps to reproduce the behavior
Just follow readme and try to request subscription
The text was updated successfully, but these errors were encountered: