[英]How do I determine that my app was just downloaded from AppStore the first time?
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? 如何确定该应用程序正在运行,但是首次从AppStore下载?
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 . 您可以使用NSUserDefaults。 if appDelegate.m ->didFinishLaunchingWithOptions use this code :
如果appDelegate.m-> didFinishLaunchingWithOptions使用此代码:
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 . 安装后,此条件只能满足一次。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.