This is how it is accomplished in my app:
How can I determine that the app is running, but downloaded from AppStore for the first time?
What I could do, but I did not:
Since you have no non-app end to distinguish users Keychain as you mentioned is your only app persistance option that will survive app uninstalling. Only device Reset to factory settings would remove it.
you can use NSUserDefaults . if appDelegate.m ->didFinishLaunchingWithOptions use this code :
NSUserDefaults * userDefaults = [NSUserDefaults standardUserDefaults];
if([userDefaults objectForKey:@"first_time"] == nil){
[userDefaults setObject:@"1" forKey:@"first_time"];
//do whatever you need
}
this condition will satisfied only once after installation .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.