我处于一种奇怪的情况,我可以让 xctool
运行我的测试,但我无法找出等效的命令行来获取 xcodebuild
和/或 faSTLane scan
运行我的测试。
我有一个只有 iPad 的应用程序,只有一个方案和两个目标(otto 和 ottoTests)
使用 XCTool 命令行
xctool -scheme otto \
-sdk iphonesimulator \
CODE_SIGN_IDENTITY=""\
CODE_SIGNING_REQUIRED=NO \
-reporter pretty\
-reporter junit:./test-reports/otto.xml\
build test
Xcodebuild - 失败
xcodebuild -sdk iphonesimulator \
-scheme otto \
test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
我得到这个错误
A build only device cannot be used to run this target
所以我在这里有点不知所措 xcodebuild
和正在运行的任何 xctool
之间究竟有什么不同。
最佳答案
AFAICS,您在 xcodebuild
命令中缺少 -destination
参数。引用这个tutorial示例代码。
关于ios - Xcode命令行测试执行问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34267281/