Matteo Vitolo Matteo Vitolo - 2 years ago 230
iOS Question

Travis fails to launch simulator on xcode8

I am having issue with Travis building and testing a new ios app I am being developing.

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

This is my .travis.yml and everytime I run it Travis get me this error:

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.

I also tried putting the id of the simulator with the same result.
Please note that the same xcodebuild command is building without any issue in my workarea.

Answer Source

Make sure your iOS Deployment Target value in Build Settings is set to a value that your osx image on Travis supports.

If your app is brand new, the iOS Deployment Target may be set to 10.1. The newest image Travis is providing comes with Xcode 8.0, which does not have iOS 10.1 simulators in them yet.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download