获取版本号

 

- (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

 

 

 

 

posted @ 2016-05-13 14:07  徒步阳光855  阅读(149)  评论(0编辑  收藏  举报