您的位置:首页 > 移动开发 > IOS开发

IOS开发获得设备类型和系统版本号

2012-07-16 10:48 183 查看
//here use sys/utsname.h

struct utsname systemInfo;

uname(&systemInfo);

//get the device model and the system version

NSLog(@"%@", [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]);

NSLog!@"%@", [[UIDevice currentDevice] systemName]);
//IOS

NSLog(@"%@", [[UIDevice currentDevice] systemVersion]);
//5.1
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: