Skip to content
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

[IOS] After call getAvailablePurchases(), purchaseUpdatedListener triggered many times #2815

Open
ng-ha opened this issue Aug 7, 2024 · 4 comments

Comments

@ng-ha
Copy link

ng-ha commented Aug 7, 2024

in IOS, every time i call getAvailablePurchases(), purchaseUpdatedListener triggered many times, when there is no new purchases. How do i get available purchases or purchases from history without triggering purchaseUpdatedListener?

I tried following the example, but i found this: isConsumable: true, when finish a SUBSCRIPTION transaction. Is this intended?

@cagdaseksi
Copy link

@ng-ha I'm experiencing the same issue. Could you share the code inside the purchaseUpdatedListener?

Screenshot 2024-08-22 at 17 28 10

@ng-ha
Copy link
Author

ng-ha commented Aug 23, 2024

@cagdaseksi i fixed it by using Storekit2: setup({storekitMode: 'STOREKIT2_MODE'});

@NevilPatel01
Copy link

I would suggest not to use UseEffect for every function instead use single useEffect and add all required function in it just to make sure everything goes step by step and don't break any thing in between. And as per documentation they suggest adding purchaseUpdatedListener when application start. 'It is recommended that you start listening to updates as soon as your application launches' Check full detial here.

@sontruongna
Copy link

Same issue, every time i call getAvailablePurchases(), purchaseUpdatedListener triggered many times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants