参考链接 : http://childhood.logdown.com/posts/208216/ios-access-device-information-summary-of-commonly-used-methods
//globallyUniqueString 唯一标示符,每次调用都会不一样
[[NSProcessInfo processInfo] globallyUniqueString];
//操作系统名称
[[NSProcessInfo processInfo] operatingSystemName];
//操作系统版本
[[NSProcessInfo processInfo] operatingSystemVersionString];
//物理内存
[[NSProcessInfo processInfo] physicalMemory];
//进程名称
[[NSProcessInfo processInfo] processName];
//供应商标识
[[UIDevice currentDevice] identifierForVendor];
//设备名称
[[UIDevice currentDevice] userInterfaceIdiom];
//设备类型
[[UIDevice currentDevice] name];
//系统名称
[[UIDevice currentDevice] systemName];
//系统版本
[[UIDevice currentDevice] systemVersion];
//模型 iPad or iPhone
[[UIDevice currentDevice] model];
//本地化模型
[[UIDevice currentDevice] localizedModel];
//电池状态
[[UIDevice currentDevice] batteryLevel];
//判断设置是否是7.0以上版本
[[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0f;
//判断设置是否是iPhone 或者iPad TV
[[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad;
[[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone;
[[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomTV;
网友评论