xcode 在 OS X 10.10 (Yosemite Beta) 中,如何使用 iOS 6.1 模拟器进行测试?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24901287/
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
In OS X 10.10 (Yosemite Beta), How do I Test Using iOS 6.1 Simulator?
提问by Brendan Hannemann
I am trying to target iOS 6.1 using Xcode 5 in Yosemite Beta. However, the simulator won't even run the app, or show the default icons (all I get is a black iOS-shaped screen, and Home or Lock buttons are not working). The 7.1 simulator works fine.
我正在尝试在 Yosemite Beta 中使用 Xcode 5 定位 iOS 6.1。但是,模拟器甚至不会运行应用程序,也不会显示默认图标(我得到的只是一个黑色的 iOS 形状的屏幕,并且主页或锁定按钮不起作用)。7.1 模拟器工作正常。
I have also noticed that Xcode 6 Beta does not even offer simulator versions prior to 7.1.
我还注意到 Xcode 6 Beta 甚至不提供 7.1 之前的模拟器版本。
Does this indicate that, even in the final of OS X 10.10, it will be impossible to simulate iOS versions prior to 7.x? This seems very unreasonable to me.
这是否表明,即使在 OS X 10.10 的最终版本中,也无法模拟 7.x 之前的 iOS 版本?这对我来说似乎很不合理。
Is this expected behavior?
这是预期的行为吗?
EDIT:So I had already tried re-installing and re-downloading the 6.1 simulator before posting this question, which did nothing to change the situation. I also checked other similar questions that dealt with the upgrade to Mavericks (OS X 10.9) but the versions supported seem oddly chosen.
编辑:因此,在发布此问题之前,我已经尝试重新安装并重新下载 6.1 模拟器,但这并没有改变这种情况。我还检查了其他类似的问题,这些问题涉及升级到 Mavericks (OS X 10.9),但支持的版本似乎很奇怪。
I will submit the question to Apple and report back my findings, unless someone else replies who has more concrete information on this specific case.
我会将问题提交给 Apple 并报告我的调查结果,除非其他人回复对此特定案例有更具体的信息。
采纳答案by PowerQian
As far as I have experienced, The iPhone simulator always have this kind of issue on every update of OS X, since the core of iPhone simulator is using the core of OS X, and it only support the latest two version. That is,
根据我的经验,iPhone模拟器每次更新OS X都会出现这样的问题,因为iPhone模拟器的核心是使用OS X的核心,而且只支持最新的两个版本。那是,
10.10 -> iOS 7, iOS 8.
10.10 -> iOS 7、iOS 8。
10.9 -> iOS 6, iOS 7.
10.9 -> iOS 6、iOS 7。
Meanwhile, Xcode obviously only support for downloading the latest two version simulator, which means you can get iOS 6 simulator in Xcode 5, but not in Xcode 6.
同时,Xcode 显然只支持下载最新的两个版本的模拟器,这意味着你可以在 Xcode 5 中获得 iOS 6 模拟器,而在 Xcode 6 中则不能。
However you can get the old simulator by copy/paste the old SDKs into the correct folder, but this still follows the OSX-iOS relation. That is, if you have the iOS 6 simulator SDK, you can run the iOS 6 simulator on OSX 10.9, but not OSX 10.10.
但是,您可以通过将旧 SDK 复制/粘贴到正确文件夹中来获取旧模拟器,但这仍然遵循 OSX-iOS 关系。也就是说,如果您有 iOS 6 模拟器 SDK,则可以在 OSX 10.9 上运行 iOS 6 模拟器,但不能在 OSX 10.10 上运行。
回答by Jeremy Huddleston Sequoia
iOS Simualtor runtimes older than iOS 7.0 will not work with Xcode 6. iOS Simulator runtimes older than iOS 7.1 will not work on OS X Yosemite.
早于 iOS 7.0 的 iOS Simualtor 运行时不适用于 Xcode 6。早于 iOS 7.1 的 iOS 模拟器运行时不适用于 OS X Yosemite。
Older versions of the iOS Simulator runtime cannot be made to work with Xcode 6 nor on OS X Yosemite without significant changes to those legacy runtimes.
如果不对旧版运行时进行重大更改,则旧版本的 iOS 模拟器运行时无法与 Xcode 6 或 OS X Yosemite 一起使用。
You can still build your apps to support older iOS versions by setting an older deployment target, but you will not be able to test them on a simulated device running on OS X Yosemite. You can test on a physical device running iOS 6.1, or you can run Xcode 5.1.1 in OS X Mavericks to test your project in the older simulator.
您仍然可以通过设置较旧的部署目标来构建您的应用以支持较旧的 iOS 版本,但您将无法在运行在 OS X Yosemite 上的模拟设备上测试它们。您可以在运行 iOS 6.1 的物理设备上进行测试,也可以在 OS X Mavericks 中运行 Xcode 5.1.1 以在旧模拟器中测试您的项目。