zoukankan      html  css  js  c++  java
  • 获取版本号

     

    - (void)getDeviceNumber{

        

        NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];

        CFShow((__bridge CFTypeRef)(infoDictionary));

     

        NSString *app_Name = [infoDictionary objectForKey:@"CFBundleName"];

        NSLog(@"app名称:%@",app_Name);

     

        NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];

        NSLog(@"app版本:%@",app_Version);

     

        NSString *app_build = [infoDictionary objectForKey:@"CFBundleVersion"];

        NSLog(@"app build版本:%@",app_build);

        

        

        //手机序列号 [[UIDevice currentDevice] uniqueIdentifier];

    //    NSString *identifierNumber = [UIDevice currentDevice] ;

    //    NSLog(@"手机序列号: %@",identifierNumber);

        

        //手机别名: 用户定义的名称

        NSString* userPhoneName = [[UIDevice currentDevice] name];

        NSLog(@"手机别名: %@", userPhoneName);

        //设备名称

        NSString* deviceName = [[UIDevice currentDevice] systemName];

        NSLog(@"设备名称: %@",deviceName );

        //手机系统版本

        NSString* phoneVersion = [[UIDevice currentDevice] systemVersion];

        NSLog(@"手机系统版本: %@", phoneVersion);

        //手机型号

        NSString* phoneModel = [[UIDevice currentDevice] model];

        NSLog(@"手机型号: %@",phoneModel );

        //地方型号  (国际化区域名称)

        NSString* localPhoneModel = [[UIDevice currentDevice] localizedModel];

        NSLog(@"国际化区域名称: %@",localPhoneModel );

        // 广告id

        NSString *adId = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];

        NSLog(@"广告id:%@",adId);

        // UUID

        NSString *idfv = [[[UIDevice currentDevice] identifierForVendor] UUIDString];

        NSLog(@"UUID:%@",idfv);

    }

    2016-05-13 14:26:46.444 Json[4491:133557] app名称:Json测试

    2016-05-13 14:26:46.445 Json[4491:133557] app版本:1.0

    2016-05-13 14:26:46.445 Json[4491:133557] app build版本:1

    2016-05-13 14:26:46.445 Json[4491:133557] 手机别名: iPhone Simulator

    2016-05-13 14:26:46.446 Json[4491:133557] 设备名称: iPhone OS

    2016-05-13 14:26:46.446 Json[4491:133557] 手机系统版本: 9.1

    2016-05-13 14:26:46.447 Json[4491:133557] 手机型号: iPhone

    2016-05-13 14:26:46.447 Json[4491:133557] 国际化区域名称: iPhone

    2016-05-13 14:26:49.610 Json[4491:133557] 广告id:AF195362-F19B-4167-8253-F1A2E3705775

    2016-05-13 14:26:53.617 Json[4491:133557] UUID:FA0FC69A-2D30-4866-8BBE-06B4AD0F181C

     

     

     

     

  • 相关阅读:
    2.8日自学成果
    深入数据库同步技术(3)-da-syncer介绍
    敢啃“硬骨头”,开源分布式数据库TiDB如何炼成?
    使用Sqlserver事务发布实现数据同步
    数据一致性-分区可用性-性能—多副本强同步数据库系统实现之我见
    sqlserver2014两台不同服务器上数据库同步
    采用存储复制方式同步数据,实现数据库安全升级
    Linux系统MySQL数据库主从同步实战过程
    红帽携手SAP,推动下一代移动数据库开发与同步
    阿里数据库十年变迁,那些你不知道的二三事
  • 原文地址:https://www.cnblogs.com/tom2015010203/p/5489220.html
Copyright © 2011-2022 走看看