Travis无法在xcode8上启动模拟器

时间:2016-11-11 09:14:51

标签: ios travis-ci xcode8

我遇到了Travis构建和测试我正在开发的新ios应用程序的问题。

language: objective-c
os: osx
osx_image: xcode8
before_install:
   - pod repo update > /dev/null
   - pod update
   - gem install xcpretty
script:
    - xcodebuild clean test -workspace project.xcworkspace -scheme project -destination "platform=iOS Simulator,name=iPhone 6" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO

这是我的.travis.yml,每次我运行Travis都会给我这个错误:

xcodebuild: error: Unable to find a destination matching the provided destination specifier:
        { platform:iOS Simulator, OS:latest, name:iPhone 6 }
    Ineligible destinations for the "project" scheme:
        { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
        { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device }
The command "xcodebuild clean test -workspace project.xcworkspace -scheme project -destination "platform=iOS Simulator,name=iPhone 6" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO" exited with 70.

我也尝试将模拟器的id设置为相同的结果。 请注意,相同的xcodebuild命令在我的工作区中没有任何问题。

2 个答案:

答案 0 :(得分:6)

确保iOS Deployment Target中的Build Settings值设置为Travis支持的osx图像的值。

如果您的应用是全新的,则iOS部署目标可能设置为10.1。 Travis提供的最新图像Xcode 8.0,其中还没有iOS 10.1模拟器。

答案 1 :(得分:0)

更新

Travis-CI支持xcode8.1和iOS 10.1

相关问题