zoukankan      html  css  js  c++  java
  • 设备版本,设备号,APP版本,APP名称获取

        
        //获取设备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(@"uuid唯一标示 == %@",stridentifierForVendor);//uuid唯一标示
        UIDeviceOrientation strorientation = [UIDevice currentDevice].orientation;//设备方向
        NSLog(@"设备方向 == %ld",(long)strorientation);
        
        
        NSString *executableFile = [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleExecutableKey];    //获取项目名称
        NSLog(@"获取项目名称 == %@",executableFile);
        NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleVersionKey];      //获取项目版本号
        NSLog(@"获取项目版本号 == %@",version);
        
        
        NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
        // app名称
        NSString *app_Name = [infoDictionary objectForKey:@"CFBundleDisplayName"];
        NSLog(@"app名称 == %@",app_Name);
        // app版本
        NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
        NSLog(@"app版本 == %@",app_Version);
        // app build版本
        NSString *app_build = [infoDictionary objectForKey:@"CFBundleVersion"];
        NSLog(@"app build版本 == %@",app_build);
        
    
  • 相关阅读:
    springboot 项目使用阿里云短信服务发送手机验证码
    Vue中el-form标签中的自定义el-select下拉框标签
    解决jQuery中input 失去焦点之后,不能再获取到焦点
    Java操作Jxl实现数据交互。三部曲——《第三篇》
    Java操作Jxl实现数据交互。三部曲——《第二篇》
    springboot搭建项目,实现Java生成随机图片验证码。
    echarts 配置属性参考
    最近用到echarts tab 切换遇到问题 可以参考下
    单位px和em,rem的区别
    关于定位
  • 原文地址:https://www.cnblogs.com/OIMM/p/5593046.html
Copyright © 2011-2022 走看看