Reputation: 15639
I want to show a message of instructions when user first time use my application, but then never until he won't delete it and re-download,,,
one easy way is to save some value in sqlite3 database and match it, but I want to use something else,,,,
Upvotes: 0
Views: 94
Reputation: 11413
You can do anything the other answerers suggested, or just check for a certain file (call it firstrun.txt) under app "Documents" directory to exist at startup.
If it doesn't exist, show the welcome message and create it, otherwise, do nothing. When the user updates the app, the "Documents" directory doesn't get emptied.
That's it.
Upvotes: 1
Reputation: 4606
you ca use sqlite or plist or [NSUserDefaults standardUserDefaults] for saving value.
Upvotes: 0
Reputation: 7148
I'd use NSUserDefaults
:
if ([[NSUserDefaults standardUserDefaults] boolForKey:kHasRun] == NO) {
// do something
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:kHasRun];
}
Upvotes: 1