Home > other >  Non-Consumable using with free trial, how to know if user delete the App and install meantime ree tr
Non-Consumable using with free trial, how to know if user delete the App and install meantime ree tr

Time:12-21

My app is Non-Consumable with 14 days free trial, the main issue is what if user after 7 days delete the app and install again, so in this case the free trial start from 0 isn't it without having server? or Apple provide API that gives the count of free trial?

CodePudding user response:

You have 2 options:

  1. Store this information on your server side. This is how most of the apps do it. It requires that your app has some sort of authentication for the user. In this case you could, for example, let the user log in, and as part of login response, you'd send back the number of days left until trial completion.

  2. Save this information into keychain, since the keychain survives the uninstallation. Keychain was not created for this use case, but nothing says you couldn't use it this way. Check this tutorial for example on how to use keychain.

  • Related