如何在 Xcode 4.5 上安装 iOS 4.3 模拟器?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12560399/
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 do I install the iOS 4.3 Simulator on Xcode 4.5?
提问by theory
I have Xcode 4.5 installed via the App Store, and it has iOS 5.1 and 6.0 support, but not iOS 4.3. Nor is it available for download in the "Downloads" tab of Preferences. I tried grabbing it from another computer and putting it on this one, as described by Dominik Porada, but alas that did not work. Maybe there are other files I need? How do I get the iOS 4.3 SDK back?
我通过 App Store 安装了 Xcode 4.5,它支持 iOS 5.1 和 6.0,但不支持 iOS 4.3。它也无法在首选项的“下载”选项卡中下载。我尝试从另一台计算机上抓取它并将其放在这台计算机上,如Dominik Porada 所述,但可惜没有用。也许我需要其他文件?如何取回 iOS 4.3 SDK?
采纳答案by theory
I actually did get 4.3 to appear in the Xcode 4.3 menu just by copying the iPhoneSimulator4.3.sdk
file to the Xcode.app
package, as described by Dominik Porada. I think I just had to restart Xcode again, and there it was!
正如Dominik Porada所描述的那样,我实际上确实通过将iPhoneSimulator4.3.sdk
文件复制到Xcode.app
包中使4.3 出现在 Xcode 4.3 菜单中。我想我只需要再次重新启动 Xcode,就可以了!
But it doesn't work. As pointed out in the answers to this question, iOS 4.3 is not supported on Mountain Lion. Might work fine for Lion, though.
但它不起作用。正如在这个问题的答案中指出的那样,Mountain Lion 不支持 iOS 4.3。不过,可能对 Lion 工作正常。
回答by Anil
This was the solution to run iOS 5.1 in XCode 4.2. Try following the same procedure. Try copying it from a previous version of XCode.Haven't tried it out myself.But see if it works.
这是在 XCode 4.2 中运行 iOS 5.1 的解决方案。尝试执行相同的步骤。尝试从以前版本的 XCode 复制它。我自己还没有尝试过。但看看它是否有效。
To get Xcode 4.2 on Snow Leopard to run code on a device running iOS 5.1 you can do this:
要让雪豹上的 Xcode 4.2 在运行 iOS 5.1 的设备上运行代码,您可以执行以下操作:
If you have another Mac running Lion and Xcode 4.3.1 you can copy the files from:
如果您有另一台运行 Lion 和 Xcode 4.3.1 的 Mac,您可以从以下位置复制文件:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)
Place the copied files in the equivalent place on your Snow Leopard Mac: probably
将复制的文件放在 Snow Leopard Mac 上的等效位置:可能
/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Similarly copy the iOS 5.1 SDK files found in this directory:
同样复制在此目录中找到的 iOS 5.1 SDK 文件:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
Also copy 'version.plist' from the Lion machine in the iPhoneOS.platform folder to the Snow Leopard machine.
同时将iPhoneOS.platform文件夹中Lion机器中的'version.plist'复制到Snow Leopard机器上。
Re-start Xcode on the Snow Leopard machine and re-connect the devices and it seems happy enough.
在 Snow Leopard 机器上重新启动 Xcode 并重新连接设备,它看起来很高兴。
If you don't have access to a machine with Lion and Xcode 4.3.1:
如果您无法访问装有 Lion 和 Xcode 4.3.1 的机器:
You can get the files out of the 4.3.1 DMG which can be downloaded from Apple here: Downloads for Apple Developers.
您可以从 4.3.1 DMG 中获取文件,该文件可以从 Apple 下载:Apple Developers 的下载。
Mount the DMG, Show Package Contents on the Xcode icon and drill down to
挂载 DMG,在 Xcode 图标上显示包内容并深入查看
/Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Follow the steps above.
按照上述步骤操作。
You might find it more convenient to use Apple's proprietary ditto method (sudo ditto src dest) in the terminal window to copy the folders.
您可能会发现在终端窗口中使用 Apple 专有的同上方法 (sudo ditto src dest) 来复制文件夹更方便。