zoukankan      html  css  js  c++  java
  • 获取设备号

        //获取设备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);
        
  • 相关阅读:
    时光流年(4)向往
    Vue.js入门(9)组件插槽
    时光流年(3)古韵
    Java面试题(12)哈希表
    Java面试题(11)Java中hashCode方法的作用
    Java面试题(10)Java中==、equals()、compareTo()的区别
    Java MyBatis-Plus(1)
    Vue.js入门(8)watch、computed和methods之间的区别
    Java面试题(9)常用工具
    Java MyBatis3(11)逆向工程--MyBatis Generator
  • 原文地址:https://www.cnblogs.com/OIMM/p/5591556.html
Copyright © 2011-2022 走看看