Xcode 5 未显示在 iOS 6 上运行模拟器的 Scheme 选项

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19187192/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 02:05:16  来源:igfitidea点击:

Xcode 5 not showing Scheme option to run Simulator on iOS 6

iosxcodeios-simulator

提问by weienw

Xcode 5 is behaving just fine, and I'm able to build and run apps on my iOS 7 device and in the iOS 7 simulator.

Xcode 5 运行良好,我能够在我的 iOS 7 设备和 iOS 7 模拟器上构建和运行应用程序。

However, I do want to support iOS 6.1, but I don't see any way to build and run the apps for an iOS 6 simulator.

但是,我确实希望支持 iOS 6.1,但我看不到任何方法可以为 iOS 6 模拟器构建和运行应用程序。

Things wot I've done:

我做过的事情:

Originally, I was trying to see the app in the iOS 6 simulator by switching from iOS 7 to iOS 6 in the Hardware > Device menu in the iOS Simulator application, but there aren't any apps in the iOS 6 simulator.

最初,我试图通过在 iOS 模拟器应用程序的硬件 > 设备菜单中从 iOS 7 切换到 iOS 6 来查看 iOS 6 模拟器中的应用程序,但 iOS 6 模拟器中没有任何应用程序。

I'm gathering from answers like this onethat there should be something I can select before I click Build/Run.

我从收集的答案像这样的,应该有什么我可以选择我之前单击生成/运行。

I'd love to be able to see my apps in both iOS 6 and 7 simulators. Any ideas what I'm missing? Here's a LINKto what I see when I click on the simulator dropdown.

我希望能够在 iOS 6 和 7 模拟器中看到我的应用程序。任何想法我错过了什么?这是我点击模拟器下拉菜单时看到的链接

回答by weienw

Turns out the solution was changing the deployment target for the project from iOS 6.1 to iOS 6.0, upon which the simulator scheme selection immediately showed the option to choose iOS 6 or 7 simulators. Basically the deployment target should match a simulator version that you have installed.

原来解决方案是将项目的部署目标从 iOS 6.1 更改为 iOS 6.0,在此之后,模拟器方案选择立即显示了选择 iOS 6 或 7 模拟器的选项。基本上,部署目标应该与您安装的模拟器版本相匹配。

Thanks to random commenters in questions like this onewho mentioned that that worked for them.

感谢此类问题中的随机评论者,他们提到这对他们有用。

回答by Robert Keogh

Just a little caveat....I tried what you said but it didn't work for me... Changed Deployment Target on "Project" from 7.1 to 6.0

只是一点警告......我尝试了你所说的但它对我不起作用......将“项目”上的部署目标从7.1更改为6.0

Then I realised that Deployment Target was still set to 7.1 on the "Target" - once I changed that it worked!

然后我意识到“目标”上的部署目标仍然设置为 7.1 - 一旦我改变它就可以了!

回答by Matt Tang

All you have to do is go to Xcode -> Preferences -> Choose the "Downloads" tab and install the iOS 6.0 Simulator.

您所要做的就是转到 Xcode -> Preferences -> 选择“Downloads”选项卡并安装 iOS 6.0 Simulator。

Once you're done downloading it, it should show up as an option in your schemes.

下载完成后,它应该显示为您的方案中的一个选项。

回答by Badre

Click to target or project > Build Settings > Achitecture > Supported Plateforms : change to iOS

单击目标或项目 > 构建设置 > 架构 > 支持的平台:更改为 iOS

回答by Nathan Dries

What I did to get mine working was click on the scheme to the left of where the Simulators usually appear in the dropdown, then choose edit scheme.

我所做的让我的工作是单击模拟器通常出现在下拉列表中左侧的方案,然后选择编辑方案。

A new window will display, make sure that Run is highlighted on the left and then click on the Info tab. Choose the .app file for Executable.

将显示一个新窗口,确保在左侧突出显示运行,然后单击信息选项卡。为可执行文件选择 .app 文件。

enter image description here

在此处输入图片说明

enter image description here

在此处输入图片说明

回答by BigCheesy

If you are still looking for a solution here's what worked for me:

如果您仍在寻找解决方案,那么这对我有用:

  • From the xcode beta's pull down menus, Xcode > Open Developer Tool > iOS Simulator (if you get a pop up error just dismiss it)
  • Once in the Simulator go to Hardware > Device > Manage Devices.
  • Delete everything listed under simulator.
  • Reboot your machine.
  • After that navigate back to Manage Devices in the simulator and click the plus to add back your simulators. Then the iOS 8 simulators will show up.
  • 从 xcode beta 的下拉菜单中,Xcode > Open Developer Tool > iOS Simulator(如果出现弹出错误,请关闭它)
  • 进入模拟器后,转到硬件 > 设备 > 管理设备。
  • 删除模拟器下列出的所有内容。
  • 重新启动您的机器。
  • 之后导航回模拟器中的管理设备,然后单击加号以添加回您的模拟器。然后将显示 iOS 8 模拟器。

回答by dRAGONAIR

enter image description here

在此处输入图片说明

This might help u out better..you have to copy paste iPhoneOS6.1sdk folder. This is for SDK, similarly instead of iPhoneOS.platform select iPhoneSimulator.platform and then the same path.

这可能会更好地帮助你..你必须复制粘贴 iPhoneOS6.1sdk 文件夹。这是针对SDK的,类似的代替iPhoneOS.platform选择iPhoneSimulator.platform,然后同样的路径。

回答by Ruchira Randana

Please check whether your "Deployment Target" is higher than the ones available on your simulators.

请检查您的“部署目标”是否高于模拟器上可用的目标。

enter image description here

在此处输入图片说明

回答by iOS Lifee

  1. Click on your project root.
  2. Then Go to the Build settings.
  3. Then set iOS deployment target 5.0
  4. Then select iphone6 on top left of your project.

    See this image

  1. 单击您的项目根目录。
  2. 然后转到构建设置。
  3. 然后设置iOS部署目标5.0
  4. 然后选择项目左上角的 iphone6。

    看到这张图片

回答by dRAGONAIR

Xcode5 neither has 6.0 SDK or 6.0 simulator. But what you can do is u can copy both 6.0SDK and 6.0 simulator from your previous Xcodes (xcode4.5 for 6.0 and XCode4.6 for ios6.1) You can find the simulator at /applications/xcode.app/contents/developer/platforms/iphonesimulator.platform/developer/applications/iphone simulator.app

Xcode5 既没有 6.0 SDK 也没有 6.0 模拟器。但是你可以做的是你可以从你以前的 Xcode 中复制 6.0SDK 和 6.0 模拟器(xcode4.5 for 6.0 和 XCode4.6 for ios6.1)你可以在 /applications/xcode.app/contents/developer 找到模拟器/platforms/iphonesimulator.platform/developer/applications/iphonesimulator.app

And SDK at /applications/xcode.app/contents/developer/platforms/iphoneos.platform/devicesupport/6.0

和 SDK 在 /applications/xcode.app/contents/developer/platforms/iphoneos.platform/devicesupport/6.0

Copy the entire folders for simulator and SDK in the exact same path of XCode5. Note: to go the the Contents of Xcode.app just do a right click on the .app file and you will get an option"Show Contents".

将模拟器和 SDK 的整个文件夹复制到 XCode5 完全相同的路径中。注意:要查看 Xcode.app 的内容,只需右键单击 .app 文件,您将获得一个选项“显示内容”。

Once u are done copy pasting, restart ur XCode5 and u can see 6.0/6.1 simulator as an option :)

完成复制粘贴后,重新启动您的 XCode5,您可以看到 6.0/6.1 模拟器作为选项:)