升级到Xcode 7后,Xcode 无法在模拟器上运行测试。
$ xcodebuild test -sdk iphonesimulator -scheme MyProject
Build settings from command line:
SDKROOT = iphonesimulator9.0
xcodebuild: error: Failed to build project MyProject with scheme MyProject.
Reason: Xcode cannot run using the selected device.
Travis CI和 Jenkins上重现了该问题。当我xcodebuild test
在本地机器上运行时,它运行良好。