运行iPhone/iPad模拟器进行持续集成

ryn*_*rtn 21 iphone continuous-integration ipad ios ios-simulator

我试图从命令行运行iOS模拟器.我找到了可以运行iPhone模拟器的位置.我的问题是它是否可以接收参数来指定应该启动哪个设备以及应该运行哪个应用程序.

$ ./Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/MacOS/iPhone\ Simulator

有谁知道这是否有窍门.了解更多信息对我们的持续集成流程非常有帮助.


我们现在使用WaxSim在CI构建期间自动化我们的iOS应用程序

Erw*_*ans 20

使用-SimulateApplication参数在模拟器中运行可执行文件(在.app包中可执行)

(你也可以从这个命令行编译项目:) xcodebuild -project Test.xcodeproj -arch i386 -sdk iphonesimulator

然后例如:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/Contents/MacOS/iPhone\ Simulator -SimulateApplication Test.app/Test

要么

./Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app/Contents/MacOS/iPhone\ Simulator -SimulateApplication Test.app/Test

  • 这似乎不适用于Mavericks上的Xcode 5. (5认同)

Dan*_*lar 5

要启动特定设备,您可以执行以下操作:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\Simulator.app/Contents/MacOS/iPhone\Simulator -SimulateDevice"iPhone Retina(3.5英寸)"