开发者

iOS: how to find application installation date and update date programmatically

I am developing one application in that I want to find application installation date on my device and开发者_C百科 when update happen that date and time as programmatically.


Not sure if you can find an application installation date but you could save the current date when the application is first ran. Something like this should do the trick

NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
if (![prefs objectForKey:@"installation_date"]) {
        NSDate *now = [NSDate date];
        [prefs setObject:now forKey:@"installation_date"];
}

(This code is untested)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜