码迷,mamicode.com
首页 > 移动开发 > 详细

iOS开发-获取当前设备信息

时间:2015-07-06 15:48:18      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:

1.iOS获取当前app的名称和版本号 

NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
CFShow(infoDictionary);
// app名称
NSString *app_Name = [infoDictionary objectForKey:@"CFBundleDisplayName"];
// app版本
NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
// app build版本
NSString *app_build = [infoDictionary objectForKey:@"CFBundleVersion"];

2.iOS获取当前系统版本号

NSString* phoneVersion = [[UIDevice currentDevice] systemVersion];

float phoneVersion = [[[UIDevice currentDevice] systemVersion] floatValue]
3.iOS获取当前语言 
NSArray *languages = [NSLocale preferredLanguages];
NSString *currentLanguage = [languages objectAtIndex:0];

4.获得iphone唯一标识符UDID(序列号)

NSString *UDID_No = [[UIDevice currentDevice] uniqueIdentifier];

5.当前手机型号

NSString* phoneModel = [[UIDevice currentDevice] model];

6.获得手机别名(用户定义的名称)

NSString* userPhoneName = [[UIDevice currentDevice] name];
7.获得设备名称
 
NSString* deviceName = [[UIDevice currentDevice] systemName];
8.地方型号(国际化区域名称)
 
NSString* localPhoneModel = [[UIDevice currentDevice] localizedModel];

 

iOS开发-获取当前设备信息

标签:

原文地址:http://www.cnblogs.com/ding0039/p/4624441.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!