码迷,mamicode.com
首页 > 移动开发 > 详细

iOS 获取设备型号,设备版本号,程序版本号

时间:2015-07-17 16:24:16      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:app   ios开发   

     

iOS 开发  常用到的方法


NSLog(@"uniqueIdentifier: %@", [[UIDevice currentDevice] uniqueIdentifier]);

    NSLog(@"name: %@", [[UIDevice currentDevice] name]);
    NSLog(@"systemName: %@", [[UIDevice currentDevice] systemName]);
    NSLog(@"systemVersion: %@", [[UIDevice currentDevice] systemVersion]);
    NSLog(@"model: %@", [[UIDevice currentDevice] model]);
    NSLog(@"localizedModel: %@", [[UIDevice currentDevice] localizedModel]);

 

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

 CFShow(infoDictionary);

// app名称

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

 // app版本

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

 // app build版本

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

iOS 获取设备型号,设备版本号,程序版本号

标签:app   ios开发   

原文地址:http://blog.csdn.net/lichang719/article/details/46926565

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!