iOS如何获取设备相关信息
1、获取iPhone名称:
[UIDevice currentDevice].name;
2、获取app版本号:
[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]
3、获取电池电量:
[UIDevice currentDevice].batteryLevel;
4、获取当前系统名称:
[UIDevice currentDevice].systemName;
5、获取当前系统版本号:
[UIDevice currentDevice].systemVersion;
6、获取UUID:
[[UIDevice currentDevice] identifierForVendor].UUIDString;
7、获取总内存大小:
[NSProcessInfo processInfo].physicalMemory;
8、获取当前语言:
NSArray *languageArray = [NSLocale preferredLanguages];
[languageArray objectAtIndex:0]
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:177
阅读量:66
阅读量:145
阅读量:137
阅读量:97