最近iPad升级到iPhone 3.2.1,今天准备进行真机调试,猛然发现Xcode下出现下列错误:


The version of iPhone OS on “xxxx” does not match any of the versions of iPhone OS supported for development with this copy of Xcode. Please restore the device to a version of the OS listed below. If necessary, the latest version of Xcode is available here.


Google 了一下,发现是3.2.1的目录在DeviceSupport下不存在。解决办法是用最接近的OS版本使用ln命令进行链接。不过在操作过程中有两个问题:


1. 不知什么原因,ln -s 命令后总是为文件而不是目录
2. 不知OS 3.2的build number


于是,采用最笨但最为有效的方法:


在/Developer/Platforms/iPhoneOS.platform/DeviceSupport目录下创建3.2.1目录,然后,将3.2下所有文件及目录复制到3.2.1下,重新启动Xcode,问题解决。