获取app和手机信息的一些方法

获取app和手机信息

  • 获取版本号/应用名字/手机名字/手机型号/地方手机型号/系统名字/系统版本/uuid

    NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary];
    NSString *versionNum = [infoDict objectForKey:@"CFBundleVersion"]; //版本号
        NSLog(@"%@",versionNum);
    NSString *appName = [infoDict objectForKey:@"CFBundleDisplayName"];//应用名字
        NSLog(@"%@",appName);
    NSString *name = [[UIDevice currentDevice] name];//手机名字
        NSLog(@"%@",name);
    NSString *model = [[UIDevice currentDevice] model];//手机型号
        NSLog(@"%@",model);
    NSString *localizedModel = [[UIDevice currentDevice] localizedModel]; //地方手机型号 
        NSLog(@"%@",localizedModel);
    NSString *systemName = [[UIDevice currentDevice] systemName];//系统的名字
       NSLog(@"%@",system);
    NSString *systemVersion = [[UIDevice currentDevice] systemVersion];//系统版本
       NSLog(@"%@",systemVersion);
    NSUUID *uuid = [[UIDevice currentDevice] identifierForVendor];//uuid
       NSLog(@"%@",uuid);
    

    输出结果


  • 2015-08-26 09:10:36.044 获取app和手机信息[502:35484] 1.0
  • 2015-08-26 09:10:36.044 获取app和手机信息[502:35484] cookdown
  • 2015-08-26 09:10:36.046 获取app和手机信息[502:35484] iPhone Simulator
  • 2015-08-26 09:10:36.046 获取app和手机信息[502:35484] iPhone Simulator
  • 2015-08-26 09:10:36.047 获取app和手机信息[502:35484] iPhone Simulator
  • 2015-08-26 09:10:36.047 获取app和手机信息[502:35484] iPhone OS
  • 2015-08-26 09:10:36.047 获取app和手机信息[502:35484] 8.4
  • 2015-08-26 09:10:36.047 获取app和手机信息[502:35484] uuid

你可能感兴趣的:(ios,ios开发)