ios xcode8 模拟器列表未显示

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

xcode8 list of simulators not showing

iosxcodeios-simulatorxcode8xcode8-beta4

提问by Ryan Cocuzzo

I have been only recently working with Xcode 8 beta 4 but it has been working fine up until now. The list of simulators is not showing for any of my projects. I already tried Creating a new Scheme and it did not work. How do I fix this?

我最近才开始使用 Xcode 8 beta 4,但到目前为止它一直运行良好。我的任何项目都没有显示模拟器列表。我已经尝试创建一个新的方案,但没有奏效。我该如何解决?

回答by Yoichi Tagaya

Deleting derived data and restarting Xcode worked in my case.

删除派生数据并重新启动 Xcode 在我的情况下有效。

rm -rf ~/Library/Developer/Xcode/DerivedData/*

回答by JaredH

Ensure your Deployment Targetversion in Build Settingsis also set to the desired version (and that you have that version of the respective simulator installed). In the below example, if that were set to 10.3 and I didn't have an iOS 10.3 simulator installed, I wouldn't be able to see any simulators. But because it's set to 10.1, and I have 10.1 simulators installed, I can see them. enter image description here

确保您的Deployment Target版本Build Settings也设置为所需的版本(并且您安装了相应模拟器的该版本)。在下面的示例中,如果将其设置为 10.3 并且我没有安装 iOS 10.3 模拟器,我将看不到任何模拟器。但是因为它设置为10.1,并且我安装了10.1模拟器,所以我可以看到它们。 在此处输入图片说明

回答by Alex Stone

If this issue is project - specific, you opened a project which has "Supported platforms" build setting set to iphone or such. Most likely this is due to simulator not having the required capabilities or an embedded library not compiled to run on simulator.

如果此问题是特定于项目的,则您打开了一个将“支持的平台”构建设置设置为 iphone 等的项目。这很可能是由于模拟器没有所需的功能或未编译为在模拟器上运行的嵌入式库。

Change this setting to "iOS" to see the simulators available for running.

将此设置更改为“iOS”以查看可供运行的模拟器。

enter image description here

在此处输入图片说明

回答by Charlie

Set proper deployment target. And also the simulators with greater/same deployment target versions needs to be downloaded.

设置适当的部署目标。并且还需要下载具有更大/相同部署目标版本的模拟器。

回答by user1244109

TL;DR sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

TL; 博士 sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

A year past OP, after installing Xcode 9 beta 6 the 10.3 simulators disappeared from xcode 8. rm -rf ~/Library/Developer/Xcode/DerivedData/*didn't work this time.

OP 一年后,在安装 Xcode 9 beta 6 后,10.3 模拟器从 xcode 8 中消失了。rm -rf ~/Library/Developer/Xcode/DerivedData/*这次没有工作

Runnin xcode-select --print-pathprinted /Applications/Xcode.app/Contents/Developer.

润宁xcode-select --print-path/Applications/Xcode.app/Contents/Developer

Just to make sure, tried sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer, which worked after xcode restart.

只是为了确保,试过sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer,它在 xcode 重启后工作。

回答by Jaywant Khedkar

Try this , It's working perfect for me ,

试试这个,它对我来说很完美,

Follow Below steps ,

按照以下步骤,

1) Clean Derived Data

1) 清洁派生数据

 rm -rf ~/Library/Developer/Xcode/DerivedData/   

OR

或者

 Xcode---> Preferences--->Location--->Derived Data

2) In Deployment Info change Deployment Target

2)在部署信息更改部署目标

It's equalto or lessthen the SDKversion of Xcode

等于小于XcodeSDK版本

3) Quit Xcode

3)退出Xcode

4) Reopen Xcodeyou will see list of simulators

4) 重新打开Xcode,您将看到模拟器列表

For more details refer this Detail Answer

有关更多详细信息,请参阅此详细答案

Hope this is help for some one.

希望这对某人有所帮助。

回答by Sureshkumar Linganathan

Please check your deployment target, Deployment target is greater than your iOS version this problem occurs.

请检查您的部署目标,部署目标大于您的 iOS 版本会出现此问题。

回答by Mansi Shah

In my case, I had to manually add all the emulators again after upgrading to Xcode 8

就我而言,升级到 Xcode 8 后,我不得不再次手动添加所有模拟器

Click on Product -> Destination -> Add Additional Simulators --> Add Simulator.

单击产品 -> 目的地 -> 添加其他模拟器 --> 添加模拟器。

回答by Mikhail Advani

Faced a similar issue with Xcode 8.3.2 (on Sierra) where installed devices were not showing up. Unfortunately restarting Xcode did not work for me but rebooting the machine did. Also answered on Apple developer forum

Xcode 8.3.2(在 Sierra 上)遇到了类似的问题,其中未显示已安装的设备。不幸的是,重新启动 Xcode 对我不起作用,但重新启动机器可以。也在苹果开发者论坛上回答

回答by Yuvrajsinh

No other solutions worked for me. I tried downloading new Simulator and restarted xCode, all simulators showing up now.

没有其他解决方案对我有用。我尝试下载新的模拟器并重新启动 xCode,现在所有模拟器都出现了。