[转载]iOS开发:获取设备信息

开发iOS平台的应用的时候,可以获取iOS设备的设备信息,包括设备的名称,设备的机型,设备的iOS版本等等。设备信息主要来自 UIDevice 类。

UIDevice *currentDevice = [UIDevice currentDevice];
NSString *strName = currentDevice.name;    //设备名称
NSString *strModel = currentDevice.model;    //设备类别
NSString *strLocalizedModel = currentDevice.localizedModel;    //设备本地化版本
NSString *strSystemName = currentDevice.systemName;    //设备运行的系统
NSString *strSystemVersion = currentDevice.systemVersion;    //当前系统版本
NSString *strUUIDString = currentDevice.identifierForVendor.UUIDString;    //系统识别码

原文地址:http://www.jianshu.com/p/20b5ed0cf2d3

posted @ 2016-01-02 23:36  南坞觉  阅读(162)  评论(0编辑  收藏  举报