wsmrcool 2012-10-16
为了保证兼容性,我们常常需要将app在各种iOS版本下测试。但是通常,xcode最新版会将旧的sdk覆盖。拿最新的xcode4.2来说,升级安装后,只有iOS4.3和iOS5的模拟器。解决办法是我们手工来增加旧版的模拟器。具体如下:
首先下载旧版的SDK,对应的下载链接如下(需要先登陆开发者账号):
iPhoneSDK2.2.1iPhoneSDK3.0withXcode3.1.3–LeopardiPhoneSDK3.0withXcode3.2–SnowLeopardiPhoneSDK3.1withXcode3.1.4–LeopardiPhoneSDK3.1withXcode3.2.1–SnowLeopardiPhoneSDK3.1.2withXcode3.1.4–LeopardiPhoneSDK3.1.2withXcode3.2.1–SnowLeopardiPhoneSDK3.1.3withXcode3.1.4–LeopardiPhoneSDK3.1.3withXcode3.2.1–SnowLeopardiPhoneSDK3.2Beta4withXcode3.2.2–SnowLeopardiPhoneSDK3.2FinalwithXcode3.2.2–SnowLeopardiPhoneSDK4FinalwithXcode3.2.3–SnowLeopardiPhoneSDK4.0.1withXcode3.2.3–SnowLeopardiPhoneSDK4.0.2withXcode3.2.3–SnowLeopardiPhoneSDK4.1withXcode3.2.4–SnowLeopard然后将旧版安装在不同目录。之后用ln将这些模拟器链到当前的xcode下面,示例代码如下:
cd /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs sudo ln -s /Developer-3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk . sudo ln -s /Developer-3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk . 之后启动xcode,就可以看到相应的模拟器选项了。From: http://tangqiaoboy.blog.163.com/blog/static/116114258201191323919494/