Search code examples
iosswifticloud

Detect if user has installed app previously even if deleted


I wonder if somebody can come up with a solution for the following problem.

I have created an iOS app of which for the first x amount of days the unknown user (guest) will have access to the full version of the app.

Then after the "trial" period i want to then put them on the free version of the app which will be ad supported if they don't want to pay a fee.

one issue i can for see is that the user could simply delete the app and reinstall to then restart the trial period.

One solution i can possibly imagine is that a file is uploaded to a "secure" section of the users iCloud account and check against that?

Has anybody come up against this issue before and what was the best solution you discovered without the need of a registration signup?

Thanks

Thomas


Solution

  • Your iCloud solution should work. You can also consider storing a similar flag in the device keychain as that isn't cleared when the app is deleted. Note that the user can still restore the device or disable iCloud integration on the device to 'work around' these things, but that's relatively uncommon.