iOS开发-获取设备型号信息
开发中有的时候查看设计统计数据,或者通过日志查看错误信息,这个时候我们就需要获取获取设备信息,看下关于设备有几种方法: 1 2 3 4 5 NSLog( @"%@" ,[[UIDevice currentDevice] name]); //设备名称 NSLog( @"%@" ,[[UIDevice currentDevice] model]); //设备类型 NSLog( @"%@" ,[[UIDevice currentDevice] localizedModel]); NSLog( @"%@" ,[[UIDevice currentDevice] systemName]); //系统名称 NSLog( @"%@" ,[[UIDevice currentDevice] systemVersion]); //系统版本 这个并不能满足我们的需求,我们需要获取具体的设备型号,iPhone4还是iPhone6s,32G还是64G的,我们就需要自己扩张UIDevice,实战之前我们需要看一下维基百科的文档:https://www.theiphonewiki.com/wiki/Models; 1...