常用存储位置
沙盒中的info.plist文件内容。
NSDictionary *dict = [NSBundle mainBundle].infoDictionary;
版本号:
NSString *key = @"CFBundleVersion"; NSString *lastVersion = [[NSUserDefaults standardUserDefaults] objectForKey:key]; NSLog(@"%@", lastVersion);
// 将当前版本存到沙盒[[NSUserDefaults standardUserDefaults] setObject:currentVersion forKey:key];
[[NSUserDefaults standardUserDefaults] synchronize]; // 配合这个同步一下
Document:
[[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]