IOS开发之--获取设备类型和系统版本号
2012-06-13 09:15
405 查看
#import "sys/utsname.h"
/*
* the model
* "i386" simulator
* "iPod1,1" iPod Touch
* "iPhone1,1" iPhone
* "iPhone1,2" iPhone 3G
* "iPhone2,1" iPhone 3GS
* "iPad1,1" iPad
* "iPhone3,1" iPhone 4
* @return null
*/
- (void)getDeviceModelAndSysVersion
{
//here use sys/utsname.h
struct utsname systemInfo;
uname(&systemInfo);
//get the device model
NSString *model = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]);
NSString *version = [[UIDevice currentDevice] systemVersion];
}
/*
* the model
* "i386" simulator
* "iPod1,1" iPod Touch
* "iPhone1,1" iPhone
* "iPhone1,2" iPhone 3G
* "iPhone2,1" iPhone 3GS
* "iPad1,1" iPad
* "iPhone3,1" iPhone 4
* @return null
*/
- (void)getDeviceModelAndSysVersion
{
//here use sys/utsname.h
struct utsname systemInfo;
uname(&systemInfo);
//get the device model
NSString *model = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]);
NSString *version = [[UIDevice currentDevice] systemVersion];
}
相关文章推荐
- IOS开发之--获取设备类型和系统版本号
- IOS开发之--获取设备类型和系统版本号
- ios开发过程中 设备类型的判断 系统版本号的判断
- 【获取iOS设备类型与系统版本号】结构体utsname与uname方法的使用
- [学习记录]获取iOS设备类型与系统版本号
- ios开发之获取版本号,部分设备信息
- 获取用户登录的设备类型 系统+版本号
- iOS 获取设备类型和系统信息
- iOS开发获取手机型号 (设备硬件类型)
- iOS开发,获取手机型号,系统版本号
- iOS开发获取设备唯一标识、系统版本、应用版本等信息
- iOS开发,获取手机型号,系统版本号,
- 获取IOS设备的类型和系统版本
- iOS开发 - 如何获取设备的总容量和可用容量
- iOS开发 获取app版本号
- iOS-获取Model(设备型号)、Version(设备版本号)、app(程序版本号)等
- iOS开发之获取系统相册中的图片与视频教程(内带url转换)
- iOS - 3种方法获取设备硬件类型:
- iOS开发-如何获取当前设备的IP地址和MAC地址实操指导!