Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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?

like image 507
Geri Borbás Avatar asked Oct 12 '11 09:10

Geri Borbás


People also ask

What happens when you restore in-app purchases?

Restoring purchases prevents you from losing all the things that have been purchased on the old devices. All you need to do is sign in with your old Apple ID or Google Account credentials and you would have restored your purchases.

Does restore purchases give you a refund?

ReStore has very limited storage space, so ReStore reserves the right to return items to the floor if items are not picked up within 7 calendar days. NO refund or store credit will be issued if customer neglects to pick up their item within 7 calendar days.

What does restore purchase mean on iPhone app?

Answer: A: Answer: A: It means that if you made an in-app purchase in that game but on another device you can restore those purchases with your apple ID log in credentials without having to pay again.


2 Answers

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.

like image 149
Felix Avatar answered Sep 30 '22 02:09

Felix


You will get rejection message from apple just because the product you have registered for inApp purchase might come under category Non-renewing subscriptions and consumable products. These type of products will not automatically renewable. you need to have explicit restore button in your application.

for other type of products it will automatically restore it.

Please read following text which will clear your concept about this :

Once a transaction has been processed and removed from the queue, your application normally never sees it again. However, if your application supports product types that must be restorable, you must include an interface that allows users to restore these purchases. This interface allows a user to add the product to other devices or, if the original device was wiped, to restore the transaction on the original device.

Store Kit provides built-in functionality to restore transactions for non-consumable products, auto-renewable subscriptions and free subscriptions. To restore transactions, your application calls the payment queue’s restoreCompletedTransactions method. The payment queue sends a request to the App Store to restore the transactions. In return, the App Store generates a new restore transaction for each transaction that was previously completed. The restore transaction object’s originalTransaction property holds a copy of the original transaction. Your application processes a restore transaction by retrieving the original transaction and using it to unlock the purchased content. After Store Kit restores all the previous transactions, it notifies the payment queue observers by calling their paymentQueueRestoreCompletedTransactionsFinished: method.

If the user attempts to purchase a restorable product (instead of using the restore interface you implemented), the application receives a regular transaction for that item, not a restore transaction. However, the user is not charged again for that product. Your application should treat these transactions identically to those of the original transaction. Non-renewing subscriptions and consumable products are not automatically restored by Store Kit. Non-renewing subscriptions must be restorable, however. To restore these products, you must record transactions on your own server when they are purchased and provide your own mechanism to restore those transactions to the user’s devices

like image 35
Gaurav Avatar answered Sep 30 '22 04:09

Gaurav