Problem/Issue: Recently apple has started rejecting application that has inApp purchase option but does not have Restore Button with below rejection reason
We found that your app offers In-App Purchase/s that can be restored but it does not include a “Restore” feature to allow users to restore the previously purchased In-App Purchase/s.
To restore previously purchased In-App Purchase products, it would be appropriate to provide a “Restore” button and initiate the restore process when the “Restore” button is tapped..
[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
/*Due to this line it first ask user’s apple id, password and check if user has previously purchased any pack or not. All your in-app purchase methods like updatedTransactions, completeTransaction, provideContent will be called again.. Provide Content will be called as no.of times as user has purchased no of packs. You can update flags,nsuserdefaults or database according to that..*/
//This Method will be called after restore transaction completed..You can set message or alert user that you have restored your packs etc..
– (void)paymentQueue:(SKPaymentQueue*)queue restoreCompletedTransactionsFailedWithError:(NSError*)error
//This Method will be called if user has cancelled transaction or some error occurred..
We have implmented similar solution in our App: Save The Monkey
In Save The Monkey all the assets /content related to inApp purchase was embedded inside the application, we did another interesting project called Magic Tricks Pro – Magic Trick Video Lessons which pulls the content from a server and the Transaction details of inApp purchase are also managed from server. So if a user clicks Restore Purchases using a API we send request to our server to get all the previous receipts validated and accordingly all the video’s that the user had purchased earlier downloads on his device.
Below is Screen Shot of “Restore Purchases” implemented through server side code.
Please contact us if you have an application that needs fix for the rejection or you are planning to develop an application that needs inApp purchase implemented, Space-O have over a dozen of apps done that have inApp purchased integrated.
This case study was documented and contributed by: Jignesh Thakkar, iPhone App Developer at Space-O Technologies.
Get your free consultation now