Restore Already Bought In-App-Purchases on Iphone

Restore already bought in-app-purchases on iPhone?

If the $0.99 item is non-consumable, then you should provide a "Restore Purchases" button (or similar) which calls

[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];

Assuming you've added a transaction observer already, and implemented the protocol including a case to handle a restored transaction (with state SKPaymentTransactionStateRestored) this will work.

How to restore purchase within in-app purchases?

I really wouldn't worry about it. No one is ever going to make an in-app purchase and then delete and re-download the app in the span of 10 minutes. If you have gotten it to work, you should be fine for any realistic case.

Restore transaction in in-app purchase iOS

This happened to me once before, and apparently happened to other people in the past.

If you are sure that your code is correct, give it some time and try again later. It's probably not what you wanted to hear, but it happens with the In-App Purchase mechanism.

Edit: Other people are starting to report about an issue with restoring purchases in the sandbox environment, see here.

What does restore purchases in In-App purchases mean?

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.

In-App Purchases: Restoring Purchases Server Side

See this answer here: https://stackoverflow.com/a/54153169/3166209

In summary:

If you have your own account based system, you aren't required to
restore purchases from the device receipt if they can be restored by
logging in to their (your) account. You're required you to have
restore functionality, but it doesn't have to be implemented through
StoreKit. Apple vaguely mentions this in their docs as do service
providers.

You'll notice large, cross-platform, subscription apps like Netflix don't have a restore purchases button anywhere. This is because restoring purchases with the device receipt could allow a single receipt to be shared across multiple users that log-in on the same device.

In-App Purchase: Restore Purchases button on user-bound purchase

If you don't implement restore button for your in-app purchase implementation, Apple will reject your app.

Their idea is if any iTunes user has paid for some content, he should be able to access the content on any device.
How you are using the receipt and allowing the user that's up to you.

Is it possible to automatically restore in app purchases on iOS?

It's awesome that you're thinking about little details like that. Keep it up!

Unfortunately, there is a reason that this isn't done in apps: the dreaded password dialog. When attempting to restore IAP's, the system asks the user for their iTunes Store password.

It's not really the best user experience to have a big ugly password dialog come up as soon as an app is opened. The user (if security conscious) will probably dismiss the dialog.

On the other hand, users are used to pressing a 'restore purchases' button. It makes sense that to restore a purchase a password is required, and thus they will give it.

Just implement the standard, plain, boring restore button. Keep thinking of these little things, though!



Related Topics



Leave a reply



Submit