After restoring or buying a non-consumable in iOS, a "restore"is triggered in initialization

On iOS devices:

  1. Purchase 2 or 3 non-consumable products.
  2. Reinstall the app and open it.
  3. After reinstalling, confirm that no ProcessPurchase calls are triggered during Unity IAP initialization (correct behaviour).
    4.Attempt to purchase one of the products previously purchased on Step 1.
  4. A window with the message “You’ve purchased this product before. Do you want to get it again?” or something appears. Confirm.
  5. Notice that the purchase is completed successfully.
  6. Restart the app.
  7. After restart, confirm that ProcessPurchase calls are being triggered for all products purchased before on Step 1 (incorrect).

The STR are identical to this thread:

Except I’ve tried it on Unity IAP 4.5.2 and Unity IAP 4.9.3.
Unity version: 2021.3.28f1

Bumping up.

Bumping up

Hello,

On iOS, transactions that are processed come from Apple, so we have no control on what the transaction listener is receiving. We noticed a while back that in certain cases, every past transactions would be sent again and go through the ProcessPurchase.

In IAP 4.6.0, we introduced Product.appleProductIsRestored where we flag those products that were already processed in the past to let you decide how to handle them. You can use this to filter them during the ProcessPurchase.

Let us know if this solves your issue!