You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the owned status of non-consumable product changes to true
make code changes, save them and the app gets reloaded
all products from CdvPurchase.store.products have the owned status as false
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
app starts
buy a non-consumable product
the owned status of non-consumable product changes to true
make code changes, save them and the app gets reloaded
all products from CdvPurchase.store.products have the owned status as false
close app and restart app --> this does set the correct status again
The text was updated successfully, but these errors were encountered:
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?).
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: