4.4.6
0.61.5
ios
requestSubscription promise is resolved
requestSubscription promise never resolved
Real Device
Just follow readme and try to request subscription
We recommend this to be handled in purchaseUpdated event handler. Therefore, resolving this method seems quite useless but if this should be handled, I'll take a look.
@hyochan Resolving the promise would create a consistent api as requestPurchase is a promise as well that resolves. Additionally, this creates an easy implementation for showing a spinner while the user is purchasing. Using the purchase update listener for that would require a more complex architecture.
Thank you so much for your amazing work on this library!
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.