Unlock premium content with in-app purchase on iPhone

I need to add an in-app purchase option for the iPhone. All you need to do is to unlock additional content - there is content in the alredy package, it's just a matter of setting a flag for the premium class - yes or no.

As it’s quite easy to implement (I just need to check if the appstore transaction was successful or failed and set the flag accordingly), I’m wondering what will happen if the user uninstalls the application and then reinstalls it - all data stored on the device is deleted when it is deleted applications ...

What is the right way to make such a purchase? Or will the appstore app in any way notify the app of purchases made with this account when the app is reinstalled?

+4
source share
1 answer

It depends. If premium content is not consumed, the appstore will track user purchases. However, for consumable content, you need to track yourself using your own server infrastructure.

See. "Restoring transaction" in the programming manual applications .

+4
source

Source: https://habr.com/ru/post/1338000/


All Articles