如何通过 CLI 擦除 Xcode 10 模拟器克隆? [英] How do I erase an Xcode 10 simulator clone through CLI?

查看:29
本文介绍了如何通过 CLI 擦除 Xcode 10 模拟器克隆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它们是否共享相同的 UDID?它们是如何在幕后实施的?

Do they share the same UDID? How are they implemented under the hood?

场景是我有 4 个并行运行 UI 测试的克隆.我需要一个干净的模拟器来进行一些测试(但想保持随机测试顺序)

The scenario is I have 4 clones running UI tests in parallel. I need a clean simulator for some tests (but want to keep random test order)

推荐答案

擦除所有测试模拟器的命令(之后你需要重新启动 Xcode):

Command to erase all testing simulators (you'll need to restart Xcode after that):

xcrun simctl --set testing delete all

总的来说,最好只重置那些 sims(之后你不需要重新启动):

Overall, it should be better to just reset those sims (you won't need to restart after that):

xcrun simctl --set testing shutdown all
xcrun simctl --set testing erase all

要擦除特定的,您首先需要使用list devices 获取他的 ID,然后关闭并擦除:

To erase specific one you first need to get his ID with list devices and then shutdown and erase:

xcrun simctl --set testing list devices
xcrun simctl --set testing shutdown 2BC2B50E-C4BA-45B9-9C73-AF5097BA1F0B
xcrun simctl --set testing erase 2BC2B50E-C4BA-45B9-9C73-AF5097BA1F0B

感谢 Scott McCoy 的回答.

Thanks Scott McCoy for his answer.

这篇关于如何通过 CLI 擦除 Xcode 10 模拟器克隆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆