首先导入<sys/utsname.h >
"i386" simulator
"iPod1,1" iPod Touch
" iPhone1,1 " iPhone
" iPhone1,2" iphone 3G
" iPhone2,1" iphone 3GS
" ipad1,1" iPad
"iPhone3,1" iphone4
struct utsname systemInfo
uname(&systemInfo);
得到设备系统版本
[ UIDevice currentDevice ].systemVersioin
得到设备模型 类型
[ NSString stringWithCString: systemInfo.machine encoding: NSUTF8StringEncoding ];