ios 如何卸载下载的 Xcode 模拟器?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30939453/
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 to uninstall downloaded Xcode simulator?
提问by Ricardo Sanchez-Saez
How to uninstall one of the downloaded Xcode simulators?
如何卸载下载的 Xcode 模拟器之一?
My iOS 7 Simulatorwon't boot (Unable to boot the iOS Simulator
). I want to completely reinstall it.
我的iOS 7 模拟器无法启动 ( Unable to boot the iOS Simulator
)。我想完全重新安装它。
I tried:
我试过:
- Deleting
~/Library/Caches/com.apple.dt.Xcode
- Deleting Xcode and downloading it again from the App Store.
- 删除
~/Library/Caches/com.apple.dt.Xcode
- 删除 Xcode 并从 App Store 重新下载。
But the iOS 7.1 Simulator remains installed. How to remove it?
但 iOS 7.1 模拟器仍然安装。如何删除它?
Note that I also tried:
请注意,我也尝试过:
- Resetting the simulator content and settings.
- Deleting the simulator device and creating it again.
- 重置模拟器内容和设置。
- 删除模拟器设备并重新创建它。
and it didn't fix my problem.
它没有解决我的问题。
回答by Nimit Parekh
You can remove them from /Library/Developer/CoreSimulator/Profiles/Runtimes
(Not ~/Library
!):
您可以从/Library/Developer/CoreSimulator/Profiles/Runtimes
(Not ~/Library
!) 中删除它们:
回答by CTiPKA
NOTE: This will only remove a device configuration from the Xcode devices list. To remove the simulator files from your hard drive see the previous answer.
注意:这只会从 Xcode 设备列表中删除设备配置。要从硬盘驱动器中删除模拟器文件,请参阅上一个答案。
For Xcode 7 just use Window \ Devices menu in Xcode:
对于 Xcode 7,只需使用 Xcode 中的 Window \ Devices 菜单:
Then select emulator to delete in the list on the left side and right click on it.
Here is Delete option:
然后在左侧列表中选择要删除的模拟器并右键单击它。这是删除选项:
That's all.
就这样。
回答by Steve Moser
Run this command in terminal to remove simulators that can't be accessed from the current version of Xcode in use.
在终端中运行此命令以删除无法从当前使用的 Xcode 版本访问的模拟器。
xcrun simctl delete unavailable
xcrun simctl delete unavailable
Also if you're looking to reclaim simulator related space Michael Tsaifound that deleting sim logs saved him 30 GB.
另外,如果您想回收模拟器相关的空间,Michael Tsai发现删除 sim 日志为他节省了 30 GB。
~/Library/Logs/CoreSimulator
回答by possen
Slightly off topic but could be very useful as it could be the basis for other tasks you might want to do with simulators.
稍微偏离主题,但可能非常有用,因为它可能是您可能想用模拟器完成的其他任务的基础。
I like to keep my simulator list to a minimum, and since there is no multi-select in the "Devices and Simulators" it is a pain to delete them all.
我喜欢将我的模拟器列表保持在最低限度,并且由于“设备和模拟器”中没有多选,因此将它们全部删除是很痛苦的。
So I boot all the sims that I want to use then, remove all the simulators that I don't have booted.
所以我启动了所有我想使用的模拟器,然后删除所有我没有启动的模拟器。
Delete all the shutdown simulators:
删除所有关机模拟器:
xcrun simctl list | grep -w "Shutdown" | grep -o "([-A-Z0-9]*)" | sed 's/[\(\)]//g' | xargs -I uuid xcrun simctl delete uuid
If you need individual simulators back, just add them back to the list in "Devices and Simulators" with the plus button.
如果您需要返回单个模拟器,只需使用加号按钮将它们添加回“设备和模拟器”中的列表。