-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
Products owned status changes on IOS Ionic Capacitor Live reload #1562
Comments
I believe thought that this would work if receipt validation is setup (is it your case?). Calling "initialize" should trigger a receipt validation call that'll make the plugin aware of non-consumable purchases (and subscriptions). Without receipt validation, on iOS, purchases won't be reported again. That could potentially be fixed by keeping a cache of transactions on the native side, but could create other issues (like a reload after switching AppStore account would report incorrect transactions, other side effects maybe?). Not sure how important that is, notice that in debug you could probably work with "TEST" products, that will work across reloads (because they're pure JS) -- cf https://github.com/j3k0/cordova-plugin-purchase/wiki/v13-reference:-Test-Adapter |
Observed behavior
Using live reload:
When employing live reload with Ionic on iOS, purchasing a non-consumable product, making code changes, and triggering app restart, the CdvPurchase.store.products function returns all products as not owned. However, upon calling restorePurchases, the purchases are accurately restored. It appears that not all plugin code is reloaded during live reload, and the paymentQueue function is not executed again after the reload.
This issue doesn't require immediate fixing but might be beneficial to document.
Expected behavior
During live reload, purchasing a non-consumable product should retain its owned status even after recompilation.
Simple workaround
The text was updated successfully, but these errors were encountered: