首页 > 移动平台 > 详细

获取ios设备信息

时间:2018-10-09 11:28:53      阅读:158      评论:0      收藏:0      [点我收藏+]
// 获取ios设备信息
- (void)viewDidLoad {
NSString *content=[[NSString alloc]
initWithFormat:
@"unique id: %@ \nlocalized model: %@ \nsystem version: %@ \nsystem name: %@ \nmodel: %@",
[[UIDevice currentDevice] uniqueIdentifier],
[[UIDevice currentDevice] localizedModel],
[[UIDevice currentDevice] systemVersion],
[[UIDevice currentDevice] systemName],
[[UIDevice currentDevice] model]];
 
UIDevice *device_=[[UIDevice alloc] init];
 
NSLog(@"设备所有者的名称--%@",device_.name);
 
NSLog(@"设备的类别-----%@",device_.model);
 
NSLog(@"设备的的本地化版本-%@",device_.localizedModel);
 
NSLog(@"设备运行的系统---%@",device_.systemName);
 
NSLog(@"当前系统的版本---%@",device_.systemVersion);
 
NSLog(@"设备识别码-----%@",device_.identifierForVendor.UUIDString);
 
//得到设备屏幕高度
 
float screenHeight=[UIScreen mainScreen].bounds.size.height;
NSLog(@"%@",content) ;
NSLog(@" screenHeight is %f",screenHeight)
 
//得到手机本机号
id number= [[NSUserDefaults standardUserDefaults] objectForKey:@"SBFormattedPhoneNumber"];
 
NSLog(@"number is %@",number);
 
}

获取ios设备信息

原文:https://www.cnblogs.com/frounk/p/9759271.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!