What does "restore purchases" in In-App purchases mean?

Geri Borbás picture Geri Borbás · Oct 12, 2011 · Viewed 206.6k times · Source

I don't really understand this idea. Do I have to provide a restore button for the user? What method should this method invoke? What will restore will do?

Answer

Felix picture Felix · Oct 12, 2011

You typically restore purchases with this code:

[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];

It will reinvoke -paymentQueue:updatedTransactions on the observer(s) for the purchased items. This is useful for users who reinstall the app after deletion or install it on a different device.

Not all types of In-App purchases can be restored.