OGeek|极客世界-中国程序员成长平台

标题: ios - xctool 无法使用请求的 iOS 版本运行 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 17:29
标题: ios - xctool 无法使用请求的 iOS 版本运行

我正在使用 Xcode 6.4 和 iOS 8.4 使用以下命令在 Circle CI 上运行 iOS 测试:

xctool -workspace ios.xcworkspace -scheme ios test -sdk iphonesimulator8.4

但是当模拟器运行时,它无法运行我的测试并且我收到这个错误:

Test did not run: The simulator failed to start, or the TEST_HOST application failed to run. Simulator error: Exception encountered connecting to CoreSimulatorBridge: Unable to connect to CoreSimulatorBridge

查看日志,看起来模拟器实际上是在尝试针对 iOS 9 运行:

run-test iosTests.xctest (iphonesimulator9.0, iPhone 4s, application-test)

有没有办法强制它在 iOS 8.4 上运行以便测试运行?



Best Answer-推荐答案


我最近在 Circle CI 上遇到了同样的问题。我不确定它是否与 xctool 的最新版本(0.2.7)有关,但添加它为我修复了它:

-destination platform='iOS Simulator,OS=8.4,name=iPhone 6'

所以在你的情况下完整的命令应该是:

xctool -workspace ios.xcworkspace -scheme ios test -sdk iphonesimulator8.4 -destination platform='iOS Simulator,OS=8.4,name=iPhone 6'

关于ios - xctool 无法使用请求的 iOS 版本运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33998370/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4