可能重复:使用iPhone SDK确定设备(iPhone,iPod Touch)如何通过代码查找iPhone / iPod设备型号(3G,3GS,4,4S)?
我知道有一种方法可以通过使用命令[[UIDevice currentDevice] model]或[[UIDevice currentDevice] localizedModel]来获取手机的模型和本地化模型,但是在几个iPhone上,两个命令都生成相同的结果,这是“iPhone”(或所有iPad的“iPad”) .
我希望找到一种方法来检测设备是iPhone 3,3S,4,4S还是5(或iPad 1,2等) . 这个值是否隐藏在uniqueIdentifier中,还是有更简单的方法来查找它?
1 回答
来自this iphonedevsdk post,
检查this blog "iPhone @2x Graphics, scale, and iPad"和this list of identifiers .