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

时间:2023-03-09 04:16:43
[转载]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