Take the 2-minute tour ×

I want to store a date string in the iphone device, but not in the application context, because if a user deletes the app then that value is deleted too.

Is this possible?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

A possible solution is to store all the information on a server. You could use rails, php, or any other server framework to do this. Also, there's a new service that's trying to make it so you don't have to do any server coding at all: http://www.parse.com

share|improve this answer
Actually I am using the server solution (php/yii/custom scripts) to update my content. The date string I wanted was to hold the last update of the database (sqlite) that I was updating via server and subscription. But I realized that subscription info could keep track of what kind of data I would give to my users afterall. The whole talk was to have each "subscriber" a version of the database that would be dated up until the last update before the user's subscription end (don't ask me it was in the specs). –  Panagiotis Jun 21 '11 at 18:24

Store it in the keychain. Keychain data is not deleted when the app is.

share|improve this answer
Thanks for the solution, It's nice to know that feature for future projects. Btw, does it work on IPhone 3.x firmware? –  Panagiotis Jun 21 '11 at 18:25
I must say, I have no idea. Try it out, it's relatively easy (test it out with overhrd.com/?p=208) since the behavior seems to be the same in the simulator. –  Remy Vanherweghem Jun 21 '11 at 18:44

If the application gets deleted on iPhone, all its related files are also deleted. Including files, SQLite databases and preferences.

If you want preference to persist after deletion, you will need a server and allow the user to store that information there (in the cloud).

share|improve this answer

Your Answer


