首页 > 移动平台 > 详细

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

时间:2015-07-06 15:45:50      阅读:252      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!