Search code examples
iosswiftin-app-purchasestorekit

How to keep track of the purchased items in StoreKit?


I have implemented an in-app purchase in my app that allows the user to use an advanced feature once (consumable product). How is it possible to track if the user have used this feature or not after the payment ?

Example:

The user have done the payment and suddently killed the app, he should be able to use the advanced feature after relaunching the app.

I do not want to use UserDefaults to track this. Does StoreKit provide any solution to that ?


Solution

  • At the time of purchase, you would verify the receipt with your server and while you are doing this, save the data you need in your own database.

    See: Validating Receipts with the App Store