获取设备信息
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"]);
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。