aeubanks
aeubanks

Reputation: 1311

How do you store information a device even after an app is deleted?

I am trying to allow the user to try a trial of something in my app but only once. How do I store this information even after the user deletes the app so that the user cannot reinstall the app to try the trial again?

Upvotes: 0

Views: 287

Answers (3)

Martin R
Martin R

Reputation: 539735

You can use the Keychain, because the Keychain items are not deleted even if the app is removed from the device. (It may be removed with a "secure wipe", as stated here: https://stackoverflow.com/a/3885110/1187415, I am not sure about that.)

Upvotes: 3

ajay
ajay

Reputation: 3345

This will be happen if your using Authentication for your application. The solution is like this, Put one Authentication Page as a starting point for your app. once user login send the information to your server. Next time onwards even user deleting your app and re instal also there is no possibility to use it, in your web server response will be changed.

app-->login-->server-->response-->opening app--> storing the response in local persistence this will happen every time user re instal the app. Let us assume your trail module will open by clicking on a button, Once click on the button put check and get info from your local persistence and intimate to user with your error message.

Hope this ll help you to get idea on the server-client model.Good luck.

Note: Once user deletes your app all the data related to your app will be deleted from the device.

Upvotes: 0

matt
matt

Reputation: 535119

Unfortunately the combination of the way the App Store works and the way sandboxing works prevents that kind of thing. You could, however, make it more difficult for the user to do the thing multiple times. Just put a BOOL in the NSUserDefaults saying the user has done the thing, and refuse to do it again. Of course the user can delete the app (thus deleting the NSUserDefaults), reinstall it, and do the thing again — once. But that would be a lot of work, so there's your deterrent.

Upvotes: 0

Related Questions