是否可以检查用户何时下载我的ios应用程序? [英] Is it possible to check when user downloaded my ios app?
问题描述
是否可以检查用户何时下载了我的iOs应用程序,如果可以,是否可以通过以下方式制作if语句:
Is it possible to check when the user downloaded my iOs app, and if so, is it possible to make a if statement out of it like:
if(downloadDate>1march) {
}
<抱歉,如果您认为这个问题很糟糕,那么任何代码都会非常受欢迎:D
sorry if you think the question is bad... any code would be greately appreciated though :D
也应该提到我的应用已经在AppStore上了六个月......
should also probably mention that my app has been on the AppStore for six months...
推荐答案
我不确定是否有办法自动检查下载日期。
I'm not sure if there's a way to automatically check a download date.
但您当然可以设置应用程序首次启动的日期。在您的app delegate中的appDidFinishLaunching方法中:
But you can certainly set a date for when the app was very first launched. In your appDidFinishLaunching method in your app delegate:
if (![[NSUserDefaults standardDefaults] objectForKey:@"FirstLaunch"]) {
[[NSUserDefaults standardDefaults] setObject:[NSDate date] forKey:@"FirstLaunch"];
}
此后的任何一点,您都可以查看此日期并将其与您的任何日期进行比较想要。
Any point after this, you can check this date and compare it to whatever you want.
这篇关于是否可以检查用户何时下载我的ios应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!