获取手机硬件信息,APP信息(UUID,应用版本等)

时间:2021-6-3 作者:qvyue
获取设备信息
NSLog(@"设备所有者 %@", [UIDevice currentDevice].name);
NSLog(@"设备类型   %@", [UIDevice currentDevice].model);
NSLog(@"本地化版本 %@", [UIDevice currentDevice].localizedModel);
NSLog(@"当前系统版本 %@", [UIDevice currentDevice].systemVersion);
NSLog(@"当前系统   %@", [UIDevice currentDevice].systemName);
NSLog(@"UUID      %@", [[[UIDevice currentDevice] identifierForVendor] UUIDString]);
NSLog(@"电量      %f", [[UIDevice currentDevice] batteryLevel]);  // -1为模拟器,0-1为真机

获取本地相关设置
NSArray *languageArray = [NSLocale preferredLanguages];
NSLog(@"语言: %@", [languageArray objectAtIndex:0]);
    
NSLocale *locale = [NSLocale currentLocale];
NSLog(@"国家: %@", [locale localeIdentifier]);

APP相关信息
NSDictionary *info = [[NSBundle mainBundle] infoDictionary];
NSLog(@"所有应用信息 %@", info);
NSLog(@"APP应用名称  %@", info[@"CFBundleDisplayName"]);
NSLog(@"APP应用版本  %@", info[@"CFBundleVersionString"]);
NSLog(@"APP应用Build版本  %@", info[@"CFBundleVersion"]);
NSLog(@"APP应用唯一标识    %@", info[@"CFBundleIdentifier"]);
声明:本文内容由互联网用户自发贡献自行上传,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任。如果您发现有涉嫌版权的内容,欢迎发送邮件至:qvyue@qq.com 进行举报,并提供相关证据,工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。