iOS 获取设备相关信息

//设备相关信息的获取
    NSString *IMEI = (NSString *)[[UIDevice currentDevice] identifierForVendor];
    NSLog(@"设备唯一标识:%@", IMEI);//UUID,5.0后不可用

    NSString *osVersion = [[UIDevice currentDevice] systemVersion];
    NSLog(@"系统版本号:%@", osVersion);// e.g. @"4.0"

    NSString* clientModel = [[UIDevice currentDevice] model];
    NSLog(@"手机型号: %@",clientModel);   //手机型号

    NSString * appVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
    NSLog(@"App应用版本:%@", appVersion);
    // 请求时间
    NSDate * nowDate = [NSDate date];
    NSInteger nowInterval = [nowDate timeIntervalSince1970];
    nowInterval = nowInterval + 8 * 3600;
    NSString * reqTime = [NSString stringWithFormat:@"%ld",(long)nowInterval];
    NSLog(@"请求时间:%@", reqTime);
2016-03-08 11:17:41.236 MD5[1612:60b] 设备唯一标识:<__NSConcreteUUID 0x17da75e0> 3F7ADBB0-D4A5-4923-99ED-71D782CFE085
2016-03-08 11:17:41.239 MD5[1612:60b] 系统版本号:7.1.2
2016-03-08 11:17:41.243 MD5[1612:60b] 手机型号: iPhone
2016-03-08 11:17:41.247 MD5[1612:60b] App应用版本:1.0
2016-03-08 11:17:41.250 MD5[1612:60b] 请求时间:1457435861
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值