iUser
iUser

Reputation: 1075

In-App Purchase App Update

I have an app on app store with 2 In-App purchases. Now I want to update my app , and obviously who already purchased my In-app purchase , will should not have to pay again. It should be free for those users. I have no idea what should i have to do for that.

Can anyone please guide me here ? Any help will be appreciated.
Thank you.

Upvotes: 1

Views: 305

Answers (3)

Roberto Canogar
Roberto Canogar

Reputation: 1614

When a user buys some item (IAP), the app should save the state of the purchase of that item in a plist through NSUserDefaults. I think that is the standard way to do it, and probably what you have done, isn't it?

So each user has the App file and also a plist (with all the values that you want to save from session to session, including the state of the purchasable items). When there is an update to the App, the App file gets replaced, but the plist as far as I know does not change. I have never done an update yet, but in the comment of H2CO3 to this answer it says so (note that H2CO3 has quite a lot of reputation). So, you can change the App but if you don't change how the state of this purchases is stored by NSUserDefaults and retrieved when a new session starts, then you should be OK and the user that updated will have the already bought items. On the other hand, if the user deletes and reinstalls the App instead of updating then he will lose the plist, and the only option to recover the items is through a Restore as other answers have pointed out.

Upvotes: 1

Rushabh
Rushabh

Reputation: 3203

you need not only to call [[SKPaymentQueue defaultQueue] restoreCompletedTransactions];, but implement the restoring itself too (i mean, providing the content to user).

Upvotes: 1

iPhone developer.
iPhone developer.

Reputation: 2132

You can put one Restore button in your application and user can restore already purchased IAP from it. I assume that you have kept non-consumable product for your application. So, in that case don't worry, it will not charge user again for purchasing..

Upvotes: 3

Related Questions