Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
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

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.

like image 961
Matteo Vitolo Avatar asked Mar 11 '23 16:03

Matteo Vitolo


1 Answers

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.

like image 90
achan Avatar answered Mar 23 '23 23:03

achan