Closed vvodicka closed 1 year ago
The reason for this is that the restore transactions are marked as finished as soon as getAvaiableItems
gets called. It makes it convenient because other platforms (including Storekit2) handle it automatically. However, there are situations when you'd like to have the freedom to handle finishing the transaction manually. I have this on my list to fix as soon as 11.0.0 lands
Released on 11.0.2
Please set automaticallyFinishRestoredTransactions
to false when calling getAvailableItems
. Like so: getAvailableItems({automaticallyFinishRestoredTransactions:false})
Keep in mind that when this is set to false, you'll have to call finishTransaction
when you are done restoring the purchase
Actually it seems to have bug. I get getAvailableItems is not a recognized Objective-C method
error screen when trying to call getAvailableItems (with or without that newly added parameter)
Description
Docs for
getAvailablePurchases
says, it shall return "all purchases made by the user (either non-consumable, or haven't been consumed yet)". If I use it to get not-yet-consumed consumables, it returns correct data only once. Then it returns empty array till I make another purchase.currentPurchase
is still set correctly during this behaviour. Above description applies also togetPurchaseHistory
Example:
Actual Behavior
console log after
logPurchases
button press:after 1st [{"productId": "com...]
after 2nd [ ]
Expected Behavior
console log after
logPurchases
button press:after 1st [{"productId": "com...]
after 2nd [{"productId": "com...]
Environment:
To Reproduce Steps to reproduce the behavior:
See example