如何从 Xcode 中删除多余的 iOS 模拟器条目?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31867549/
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 remove redundant iOS simulator entries from Xcode?
提问by Ilias Karim
采纳答案by l'L'l
XCode> Window> Devices:
XCode>窗口>设备:
Then use the delete key or click the gear icon to remove simulators.
然后使用删除键或单击齿轮图标删除模拟器。
回答by Luke
If you want to do this quickly I'd recommend fastlane tools you can reset simulators with one line
如果您想快速完成此操作,我建议您使用 fastlane 工具,您可以用一行来重置模拟器
fastlane snapshot reset_simulators
install fastlane tools
安装 fastlane 工具
sudo gem install fastlane
Make sure, you have the latest version of the Xcode command line tools installed:
确保您安装了最新版本的 Xcode 命令行工具:
xcode-select --install
(https://docs.fastlane.tools/actions/capture_ios_screenshots#completely-reset-all-simulators)
(https://docs.fastlane.tools/actions/capture_ios_screenshots#completely-reset-all-simulators)
And the command is
命令是
fastlane snapshot reset_simulators
回答by ?afak Gezer
You don't need to delete the Simulators you don't want to see on the run destinations drop-down menu. On Xcode 9 you can just hide the ones that you don't need.
您无需删除不想在运行目标下拉菜单中看到的模拟器。在 Xcode 9 上,您可以隐藏不需要的那些。
Go to Window > Devices and Simulators(ShiftCmd2)
Pick the Simulator from the left and untick 'Show as run destination' as seen below:
转到窗口 > 设备和模拟器( ShiftCmd2)
从左侧选择模拟器并取消勾选“显示为运行目标”,如下所示:
回答by Harry McGovern
You can remove devices easily now in XCode 9, but use the Simulator toolbar. With a Simulator running, go to the top bar and go to Hardware -> Device -> Manage Devices then select Simulators. You are presented with the option [Devices | Simulators] So select simulators. Then work your way down the list, and untick the Simulators, and OS versions you don't want. Too easy. When you look in XCode for a Simulator to use, the list will now be much shorter. Removing unwanted Simulators
您现在可以在 XCode 9 中轻松删除设备,但使用模拟器工具栏。运行模拟器后,转到顶部栏并转到硬件 -> 设备 -> 管理设备,然后选择模拟器。您将看到选项 [设备 | 模拟器] 所以选择模拟器。然后按照您的方式在列表中工作,并取消选中您不想要的模拟器和操作系统版本。太容易了。当您在 XCode 中查找要使用的模拟器时,列表现在会短得多。 删除不需要的模拟器
回答by Christian
There is a nice shell script that deletes all simulators and creates a list of new ones for you on GitHub without the need of Fastlane (even though Fastlane is worth to have anyway):
有一个很好的 shell 脚本,它可以删除所有模拟器并在 GitHub 上为你创建一个新的模拟器列表,而无需 Fastlane(尽管 Fastlane 无论如何都值得拥有):