码迷,mamicode.com
首页 > 其他好文 > 详细

获取设备号

时间:2016-06-16 17:42:14      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:

 

    //获取设备id号
    UIDevice *device = [UIDevice currentDevice];//创建设备对象
    NSString *deviceUID = [[NSString alloc] initWithString:device.identifierForVendor.UUIDString];
    
    NSLog(@"**********************************************************************************************************************************%@**************************************************************************************************************************************************************************************",deviceUID); // 输出设备id
    
    
    NSString *strmode = [UIDevice currentDevice].model;//模型
    NSLog(@"%@",strmode);
    NSString *strname = [UIDevice currentDevice].name;//设备名称设备主人可以更换
    NSLog(@"%@",strname);
    NSString *strlocalizedModel = [UIDevice currentDevice].localizedModel;//模型的当地版本
    NSLog(@"%@",strlocalizedModel);
    NSString *strsystemName = [UIDevice currentDevice].systemName;//设备名称
    NSLog(@"%@",strsystemName);
    NSString *strsystemVersion = [UIDevice currentDevice].systemVersion;//版本号
    NSLog(@"%@",strsystemVersion);
    

    NSUUID      *stridentifierForVendor =[UIDevice currentDevice].identifierForVendor;
    NSLog(@"%@",stridentifierForVendor);//uuid唯一标示
    UIDeviceOrientation strorientation = [UIDevice currentDevice].orientation;//设备方向
    NSLog(@"%ld",(long)strorientation);
    
    BOOL zbatteryMonitoringEnabled = [UIDevice currentDevice].batteryMonitoringEnabled;//电池监控启用
    NSLog(@"%hhd",zbatteryMonitoringEnabled);
    
    float abatteryLevel  = [UIDevice currentDevice].batteryLevel;//设备电池状态,电池级
    NSLog(@"%f",abatteryLevel);
    

 

获取设备号

标签:

原文地址:http://www.cnblogs.com/OIMM/p/5591556.html

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