-
获取手机应用的版本信息
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
NSString *name = [infoDictionary objectForKey:@"CFBundleName"];
NSString *version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
NSString *build = [infoDictionary objectForKey:@"CFBundleVersion"];NSLog(@"%@,%@,%@,%@",infoDictionary,name,version,build);
-
获取设备的基本信息
通过UIDevice类的对象,可以获取iOS设备如下的信息
UIDevice的属性:
@property(nonatomic,readonly,strong) NSString *name; // 设备的名称,如xxx的iPhone6s
@property(nonatomic,readonly,strong) NSString *model; // 设备的类型,例如.iPhone,iPod touch
@property(nonatomic,readonly,strong) NSString *localizedModel; // localized version of model
@property(nonatomic,readonly,strong) NSString *systemVersion; // 操作系统版本号. 如:8.3, 9.2等//获取当前设备对象 UIDevice *device = [UIDevice currentDevice]; NSLog(@"name: %@", device.name); NSLog(@"model:%@", device.model); NSLog(@"localizedModel: %@", device.localizedModel); NSLog(@"systemVersion: %@", device.systemVersion); //获取设备的UUID NSLog(@"identifierForVendor: %@", device.identifierForVendor.UUIDString);
iOS获取app应用版本信息&获取设备的基本信息
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- 目录 UIDevice设备相关信息设备电量近距离传感器设备性能、界面模式NSBundle获取应用名称应用短版本号应...
- 获取手机应用的版本信息 获取设备的基本信息通过UIDevice类的对象,可以获取IOS设备如下的信息UIDevic...
- 原文链接http://www.cnblogs.com/kenshincui/p/4186022.html 音频在i...
- 刚刚在网上搜索到的,在此记录一下.便于以后使用://手机序列号NSString* identifierNumber...