我想在“构建和运行”之前在模拟器中删除一个应用程序。我如何启动模拟器,以便我可以删除?如果我通过“构建并运行”启动它,我会得到一个很长的日志输出,因为我试图修复一个错误,所以需要一段时间。我想避免这种情况。


当前回答

首先,将iOS模拟器添加到应用程序:

ln -s /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app /Applications/iPhone\ Simulator.app

从那里,你可以在Finder中打开它或将它拖到启动栏。

来源:http://www.bram.us/2010/05/05/xcode-iphone-simulator-location/

其他回答

不打开Xcode:

open /Applications/Xcode.app/Contents/Developer/Applications/iOS\ Simulator.app/

接下来,@jimbojw的新命令是用新的Xcode创建一个快捷方式(通过首选项安装):

ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app /Applications/iPhone\ Simulator.app

这将在应用程序文件夹中为您创建一个快捷方式。

首先,将iOS模拟器添加到应用程序:

ln -s /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app /Applications/iPhone\ Simulator.app

从那里,你可以在Finder中打开它或将它拖到启动栏。

来源:http://www.bram.us/2010/05/05/xcode-iphone-simulator-location/

从终端你可以使用:

open -a iPhone\ Simulator
open -a iOS\ Simulator
open -a Simulator

这一切都取决于模拟器的应用程序名称,这可以随着Xcode的每次迭代而改变。

最简单的方法是从Xcode启动模拟器,然后在dock上,按Ctrl +单击图标,选择Keep in dock