如何从命令行重置iOS模拟器? [英] How can I reset the iOS Simulator from the command line?

查看:257
本文介绍了如何从命令行重置iOS模拟器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要经常重置iPhone模拟器,并且没有使用鼠标就找不到办法。这是一件小事,但我真的厌倦了这样做,并希望有一种方法可以使用键盘快捷方式来做到这一点。

I need to reset the iPhone Simulator a lot, and haven't found a way to do it without using the mouse. It's a small thing, but I'm really sick of doing it and would love to have a way to do this using a keyboard shortcut.

更好的是一种方式从命令行重置它,所以我可以重置为部署脚本。

Even better would be a way to reset it from the command line, so I could build a reset into a deploy script.

我对iOS或MacOS不太熟悉。

I am not very familiar with iOS or MacOS.

推荐答案

简单:

xcrun simctl erase all

@txulu提出的改进,只需在执行清理之前杀死模拟器:

improvement suggested by @txulu, just kill the simulator before execute the clean:

killall "Simulator" 2> /dev/null; xcrun simctl erase all

这篇关于如何从命令行重置iOS模拟器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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