IOS-获取Model(设备型号)、Version(设备版本号)、app(程序版本号)
2015-09-08 22:54
465 查看
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"];
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"];
相关文章推荐
- Android ActionBar 一步一步分析
- 微信公众号支付(二)实现统一下单接口
- ios 内存管理个人一些见解
- IOS开发之深拷贝与浅拷贝(mutableCopy与Copy)详解
- 微信公众号支付(一)如何获取用户openId
- 条款17:以独立语句将newed对象置入智能指针(Store newed objects in smart pointers in standalone statements)
- Android回调
- Android模拟美团客户端进度提示框
- Android 基础知识总结
- Android Studio(四):Android Studio集成Genymotion
- Android Studio(四):Android Studio集成Genymotion
- iOS开发:通讯录之个人中心页面的实现
- Android Studio(三):设置Android Studio编码
- Android Studio(三):设置Android Studio编码
- Android Studio(二):快捷键设置、插件安装
- Android Studio(二):快捷键设置、插件安装
- iOS 用Runtime解决服务器返回NSNull问题
- wifi direct/p2p流程分析 基于android 5.1
- Android Studio(一):介绍、安装、配置
- Android Studio(一):介绍、安装、配置