如何在 XCode 4.2.1 (SDK5.0) 中安装较旧的 iOS 模拟器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8529572/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to Install Older iOS Simulators in XCode 4.2.1 (SDK5.0)
提问by GeneCode
I have just bought a new iMac. I then downloaded the latest SDK 5.0 and installed XCode 4.2.1. Everything is working fine. Though I realized that there are only iPhone and iPad Simulators 5.0 available for debugging. So I went on clicking the More Simulators... I click Install for all items and a while passed, and when I came back, it indicated as "Installed". But when I go back to my XCode, there are still just Simulators 5.0 in the list.
我刚买了一台新的 iMac。然后我下载了最新的 SDK 5.0 并安装了 XCode 4.2.1。一切正常。虽然我意识到只有 iPhone 和 iPad Simulators 5.0 可用于调试。所以我继续点击更多模拟器...我点击所有项目的安装,过了一段时间,当我回来时,它显示为“已安装”。但是当我回到我的 XCode 时,列表中仍然只有 Simulators 5.0。
So, how do I go about installing the older simulators in XCode 4.2.1? Did I miss any steps? Or do I need to install older SDKs? Please help. Thanks.
那么,我该如何在 XCode 4.2.1 中安装旧的模拟器呢?我错过了任何步骤吗?还是我需要安装较旧的 SDK?请帮忙。谢谢。
回答by rohan-patel
X-Code 4.2 will have iOS 5 simulator and library only.If you want lower version simulator and library with X-Code just goto X-Code->Prefrences-> DownloadsTab. In downloads tab you'll have two tabs:
X-Code 4.2 将只有 iOS 5 模拟器和库。如果您想要带有 X-Code 的低版本模拟器和库,只需转到X-Code-> 首选项- > 下载选项卡。在下载选项卡中,您将有两个选项卡:
1) Components- Here you will have option to download iOS 4.3 simulator(~600 Mb), iOS 4.0-4.1(~670 MB) Device debugging support, iOS 3.0-3.2.2(686.3 MB) Device debugging support.
1) 组件- 在这里您可以选择下载 iOS 4.3 模拟器(~600 Mb)、iOS 4.0-4.1(~670 MB) 设备调试支持、iOS 3.0-3.2.2(686.3 MB) 设备调试支持。
2) Documentation- Yoy will have option to download iOS 5.0,XCode 4.2 Developer libaray,Mac OSX 10.7 Core Library.
2) 文档- 可以选择下载 iOS 5.0、XCode 4.2 Developer libaray、Mac OSX 10.7 Core Library。
Install the components which ever you need and there you go..Have you installed components this way??
安装您需要的组件,然后就可以了..您是否以这种方式安装了组件?
回答by Antoine
If Xcode doesn't show the wanted simulators you'll be able to download older xcodes from here: https://developer.apple.com/downloads/index.action?name=Xcode
如果 Xcode 没有显示想要的模拟器,您可以从这里下载旧的 xcode:https: //developer.apple.com/downloads/index.action?name =Xcode
For example:
例如:
- iOS 5 Simulator -> Xcode 4.3
- iOS 5.1 Simulator -> Xcode 4.3.3
- iOS 6 Simulator -> Xcode 4.6
- iOS 6.1 Simulator -> Xcode 4.6.3
- iOS 7 Simulator -> Xcode 5
- iOS 7.1 Simulator -> Xcode 5.1
- iOS 5 模拟器 -> Xcode 4.3
- iOS 5.1 模拟器 -> Xcode 4.3.3
- iOS 6 模拟器 -> Xcode 4.6
- iOS 6.1 模拟器 -> Xcode 4.6.3
- iOS 7 模拟器 -> Xcode 5
- iOS 7.1 模拟器 -> Xcode 5.1
You can find the Xcode application inside the downloaded .dmg
您可以在下载的 .dmg 中找到 Xcode 应用程序
- Open this DMG
- Right click on the Xcode application and click 'Show Package Contents'
- Navigate to: Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
- Copy the found simulator folder (eg. iPhoneSimulator7.1.sdk folder)
- Repeat steps 2 & 3 for your current Xcode application
- Paste the simulator folder
- 打开这个DMG
- 右键单击 Xcode 应用程序,然后单击“显示包内容”
- 导航至:Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
- 复制找到的模拟器文件夹(例如 iPhoneSimulator7.1.sdk 文件夹)
- 为您当前的 Xcode 应用程序重复步骤 2 和 3
- 粘贴模拟器文件夹
Restarting Xcode will show you the new added simulators
重新启动 Xcode 将显示新添加的模拟器
Happy building & testing!
快乐构建和测试!
Update:
Tested in xCode 6, working there as well
更新:
在 xCode 6 中测试,也在那里工作