运行 iPhone/iPad 模拟器进行持续集成 [英] Run iPhone/iPad Simulator for Continuous Integration

查看:25
本文介绍了运行 iPhone/iPad 模拟器进行持续集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am attempting to run the iOS simulator from the command line. I have found the location where the iPhone Simulator can be run from. My question is whether or not it can receive parameters to specify which device should be launched and what app it should run.

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

有谁知道这是否有技巧.了解更多这方面的信息将真正有助于我们的持续集成流程.

Does anyone know if there are tricks to this. Knowing more about this would really help with our Continuous Integration process.

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

We now use WaxSim to automate our iOS applications during CI Builds

推荐答案

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

Use the -SimulateApplication argument to run your executable in the simulator (executable inside the .app bundle)

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

(you could also compile the project from the command-line like this:) 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

这篇关于运行 iPhone/iPad 模拟器进行持续集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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