Xcode 9 - 没有 iOS 11 模拟器

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

Xcode 9 - no iOS 11 simulator

xcodeios-simulatorios11xcode9-betaxcode9

提问by MegaCookie

When I open up the new Xcode 9 and go to Preferences > ComponentsI don't see an option to download iOS 11 simulators. I'm 100% sure I have the latest Xcode 9 beta 4 No iOS 11 sims :(

当我打开新的 Xcode 9 并转到Preferences > Components我没有看到下载 iOS 11 模拟器的选项时。我 100% 确定我有最新的 Xcode 9 beta 4没有iOS 11 sims :(

I did some research and found out that Xcode downloads an index to determine what it is able to download. For me that was: https://devimages-cdn.apple.com/downloads/xcode/simulators/index-9.0.0-CA351AD8-3176-41CB-875C-42A05C7CDEC7.dvtdownloadableindex

我做了一些研究,发现 Xcode 下载一个索引来确定它可以下载什么。对我来说是:https: //devimages-cdn.apple.com/downloads/xcode/simulators/index-9.0.0-CA351AD8-3176-41CB-875C-42A05C7CDEC7.dvtdownloadableindex

Basically one is able to use it for any Xcode version by determining the DTXcoce:
defaults read /Applications/Xcode-beta.app/Contents/Info DTXcode.
A result like 0900must be converted to 9.0.0

基本上可以通过确定 DTXcoce: 来将它用于任何 Xcode 版本
defaults read /Applications/Xcode-beta.app/Contents/Info DTXcode
结果0900必须转换为9.0.0

And the DVTPlugInCompatibilityUUID:
defaults read /Applications/Xcode-beta.app/Contents/Info DVTPlugInCompatibilityUUID

和 DVTPlugInCompatibilityUUID:
defaults read /Applications/Xcode-beta.app/Contents/Info DVTPlugInCompatibilityUUID

Then download: https://devimages-cdn.apple.com/downloads/xcode/simulators/index-<the DTXcode>-<the UUID>.dvtdownloadableindex.

然后下载:https://devimages-cdn.apple.com/downloads/xcode/simulators/index-<the DTXcode>-<the UUID>.dvtdownloadableindex

And lastly in order to be able to open it: plutil -convert xml1 <the downloaded .dvtdownloadableindex file>

最后为了能够打开它: plutil -convert xml1 <the downloaded .dvtdownloadableindex file>

Can someone verify I have the right dvtdownloadableindex? Or provide a url to the right version? Otherwise I hope someone can provide the url for the complete simulator package by downloading and cancelling the simulator while looking in to console.applike in this article

有人可以验证我有正确的 dvtdownloadableindex 吗?或者提供一个正确版本的网址?否则我希望有人可以通过下载和取消模拟器来提供完整模拟器包的url,同时console.app这篇文章中寻找喜欢

采纳答案by MegaCookie

I seem to be pretty stupid, wasting too much time than necessary.
The new iOS 11 simulators were already included in the new Xcode, (however the won't appear in the settings of Xcode) . You can just open up the simulator (/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app) and choose an iOS 11 device in the Hardware > Devicemenu bar.

我似乎很愚蠢,浪费了太多不必要的时间。
新的 iOS 11 模拟器已经包含在新的 Xcode 中(但是不会出现在 Xcode 的设置中)。您只需打开模拟器 ( /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app) 并在Hardware > Device菜单栏中选择 iOS 11 设备即可。

Xcode.appcan be Xcode-beta.apptoo.

Xcode.app也可以Xcode-beta.app

回答by CGN

In Xcode Version 9.0 beta 5 (9M202q)

在 Xcode 9.0 测试版 5 (9M202q) 中

In the menu Window > Devices and Simlators

在菜单窗口 > 设备和模拟器中

  1. Click on the + button at the bottom left corner
  2. Choose 'Device Type': 'iPhone SE'
  3. Then 'OS Version': 'iOS 11.0' can be choosen
  1. 点击左下角的+按钮
  2. 选择“设备类型”:“iPhone SE”
  3. 然后 'OS Version': 'iOS 11.0' 可以选择

enter image description here

在此处输入图片说明

Have fun!

玩得开心!

回答by Paul Addai

enter image description hereJust go to "File" in the simulation window, move your mouse to "Open device", select your ios , and finally select the type of iPhone or device you want.

在此处输入图片说明只需转到模拟窗口中的“文件”,将鼠标移动到“打开设备”,选择您的 ios ,最后选择您想要的 iPhone 或设备类型。

回答by Paul Addai

When I open up the new Xcode 9 and go to Preferences > Components I don't see an option to download iOS 11 simulators. I'm 100% sure I have the latest Xcode 9 beta 4 Answered:Here is a screenshot, there is also another way to select the emulator you want to run but It would require an update if you have not

当我打开新的 Xcode 9 并转到“首选项”>“组件”时,我没有看到下载 iOS 11 模拟器的选项。我 100% 确定我有最新的 Xcode 9 beta 4 回答:这是屏幕截图,还有另一种选择要运行的模拟器的方法,但如果您没有,则需要更新

https://i.stack.imgur.com/iZ3Ua.jpg

https://i.stack.imgur.com/iZ3Ua.jpg