NSLog(@"设备名称: %@",[UIDevice currentDevice].name);
NSLog(@"设备model: %@",[UIDevice currentDevice].model);
NSLog(@"设备localizedModel: %@",[UIDevice currentDevice].localizedModel);
NSLog(@"设备systemName: %@",[UIDevice currentDevice].systemName);
NSLog(@"设备systemVersion: %@",[UIDevice currentDevice].systemVersion);
NSLog(@"设备UUID: %@",[UIDevice currentDevice].identifierForVendor);
NSLog(@"设备orientation: %ld",[UIDevice currentDevice].orientation);
//打开检测电池状态
[UIDevice currentDevice].batteryMonitoringEnabled = YES;
//需要在真机上面
NSLog(@"电池batteryState: %ld",[UIDevice currentDevice].batteryState);
NSLog(@"设备batteryLevel: %f",[UIDevice currentDevice].batteryLevel);
NSDictionary *dicInfo = [[NSBundle mainBundle] infoDictionary];
// CFShow(dicInfo);
NSString *strAppName = [dicInfo objectForKey:@"CFBundleDisplayName"];
NSLog(@"App应用名称:%@", strAppName);
NSString *strAppVersion = [dicInfo objectForKey:@"CFBundleShortVersionString"];
NSLog(@"App应用版本:%@", strAppVersion);
NSString *strAppBuild = [dicInfo objectForKey:@"CFBundleVersion"];
NSLog(@"App应用Build版本:%@", strAppBuild);
NSArray *languageArray = [NSLocale preferredLanguages];
NSString *language = [languageArray objectAtIndex:0];
NSLog(@"语言:%@", language);//en
NSLocale *locale = [NSLocale currentLocale];
NSString *country = [locale localeIdentifier];
NSLog(@"国家:%@", country); //en_US
UIDevice的一些操作
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 大家总是说,酒后吐真言。不知你是hin赞同还是认为这是胡说八道?上周,在一场热闹的生日宴后,小S醉酒后发视频,对着...