Adding button to restore purchases
On platforms that support it (Google Play and Universal Windows Applications, most notably), if you purchase something, uninstall, and then reinstall a game using Unity IAP, it automatically restores any products the user owns during the first initialization following reinstallation. For those on iOS, users must have the ability to restore their purchases via a button due to Apple requiring them to reauthenticate their password before it happens. Not doing so will prevent our game from being accepted on the iOS App Store, so it's a good idea to include this functionality if we wish to deploy there, as follows:
- Go to the
Hierarchy
window and select theRemove Ads
button. Once selected, duplicate it by pressing Ctrl + D. - Change the duplicate's name by selecting it and changing its name to
Restore
fromInspector
. - From the
Hierarchy
tab, open up theText
object and change the text to sayRestore
as well:

- Now, select the
Restore
object, and then in theIAP Button...