How should I know if a purchase is restored or new (iOS)?

If I understand it correctly, on iOS, ProcessPurchase() is called either after a new purchase had succeeded or after a purchase had been restored. The problem is that I want to validate new purchases to make sure the player had actually asked to make that purchase but when a purchase is restored I can’t do that (because ProcessPurchase() will be called without the player having to make the purchase).

So how am I supposed to validate receipts properly and still allow players to restore purchases? Is there a way to know for sure that a purchase is being restored?

On iOS, the user is required to click the Restore button in your game to start the Restore process. You could set a boolean flag there.

1 Like

Yes, I know, but the callback method I send to RestoreTransactions() didn’t get called due to a bug in my code (I guess) so I didn’t know how to reset the boolean I used as a flag once restore is done. Now I fixed the bug and it’s working as expected. Thanks!