获取手机参数

获取手机参数

 1     // 应用名称
 2     NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
 3     NSString *appName = [infoDictionary objectForKey:@"CFBundleDisplayName"];
 4     NSLog(@"应用名称:%@",appName);
 5     
 6     // 版本号
 7     NSString *shortVersion = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
 8     NSLog(@"版本号:%@",shortVersion);
 9     
10     // 版本号(int类型)
11     NSString *version = [infoDictionary objectForKey:@"CFBundleVersion"];
12     NSLog(@"版本号(int类型):%@",version);
13     
14     // 手机标识符
15     NSUUID* identifierForVendor = [[UIDevice currentDevice] identifierForVendor];
16     NSLog(@"手机标识符: %@",identifierForVendor);
17     
18     // 手机
19     CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault);
20     NSString *uuid = (NSString *)CFBridgingRelease(CFUUIDCreateString(kCFAllocatorDefault,uuidRef));
21     NSLog(@"手机uuid: %@",uuid);
22     
23     // 系统
24     NSString *systemName = [[UIDevice currentDevice] systemName];
25     NSLog(@"系统: %@",systemName );
26     
27     // 手机系统版本
28     NSString* systemVersion = [[UIDevice currentDevice] systemVersion];
29     NSLog(@"手机系统版本: %@", systemVersion);
30     
31     // 用户手机名
32     NSString* phoneName = [[UIDevice currentDevice] name];
33     NSLog(@"用户手机名: %@", phoneName);
34     
35     // 手机型号
36     NSString *phoneModel = [[UIDevice currentDevice] model];
37     NSLog(@"手机型号: %@",phoneModel );
38     
39     // 地方型号
40     NSString *localizedModel = [[UIDevice currentDevice] localizedModel];
41     NSLog(@"地方型号: %@",localizedModel);

尊重作者劳动成果,转载请注明: 【kingdev】

posted @ 2016-03-21 09:48 Kingdev 阅读( ...) 评论( ...) 编辑 收藏
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值