iOS关于若何获取设备相关信息,APP版本号,电池电量,当前系统名称等。
获取iPhone名称:
[UIDevice currentDevice].name;
获取app版本号:
[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]
获取电池电量:
[UIDevice currentDevice].batteryLevel;
获取当前系统名称:
[UIDevice currentDevice].systemName;
获取当前系统版本号:
[UIDevice currentDevice].systemVersion;
获取UUID:
[[UIDevice currentDevice] identifierForVendor].UUIDString;
获取总内存巨细:
[NSProcessInfo processInfo].physicalMemory;
获取当前说话:
NSArray *languageArray = [NSLocale preferredLanguages];
[languageArray objectAtIndex:0]
0 篇文章
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!