在“构建和运行”之前,我想删除模拟器中的一个应用程序。我该如何启动模拟器以进行删除?如果我通过“构建和运行”启动它,由于我正在尝试修复的错误,会输出很长的日志信息,这需要一些时间。我想避免这种情况。
在“构建和运行”之前,我想删除模拟器中的一个应用程序。我该如何启动模拟器以进行删除?如果我通过“构建和运行”启动它,由于我正在尝试修复的错误,会输出很长的日志信息,这需要一些时间。我想避免这种情况。
Xcode 4.x, 5.x
在Xcode 4.x(在Mountain Lion上的4.5版本)和Xcode 5.0.x(在Mavericks上)中,它位于这里:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/
在我的Xcode版本(4.5.2)中,我发现使用dock图标或Xcode菜单中的打开开发者工具
菜单非常方便:
Xcode 3.x
在Xcode 3.x中,它位于这里:
/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app
你可以使用终端:
From Terminal you can use:
open -a iPhone\ Simulator
open -a iOS\ Simulator
open -a Simulator
这完全取决于模拟器的应用程序名称,随着每个Xcode版本迭代,这可能会改变。
iOS\ Simulator
。 - Felix自从XCode 4.3以后,模拟器的位置已经改变了。现在可以在以下位置找到模拟器:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/
关于从@jimbojw那里获得的新命令来使用新的Xcode(通过偏好设置安装)创建快捷方式:
ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app /Applications/iPhone\ Simulator.app
这将为您在应用程序文件夹中创建一个快捷方式。
这是一个较旧的问题,但如果您只想从Xcode 4.5界面运行模拟器,可以执行以下操作: Xcode > 打开开发工具 > iOS模拟器。
首先,将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
启动模拟器,然后在 dock 上,使用 Ctrl
+ Click
点击图标并选择 保留在 Dock 中
。不需要打开Xcode:
open /Applications/Xcode.app/Contents/Developer/Applications/iOS\ Simulator.app/
alias ios="open /Applications/Xcode.app/Contents/Developer/Applications/iOS\ Simulator.app"
这使得我可以直接从命令行运行 ios
。 - hayesgmSimulator.app
,而不是 iOS Simulator.app
。 - Joshua Pinter
open
是缺失的部分。 - jimbo/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app
。 - Michael Mior