J. Doe
J. Doe

Reputation: 563

Why Travis cannot run my tests?

I used Xcode 9.0 and iPhone 7 in my development. In my .travis.yml I added:

language: swift
osx_image: xcode9
script:
- xcodebuild clean test -project BullsEye.xcodeproj -scheme BullsEye
-destination "platform=iOS Simulator,name=iPhone 7,OS=11" CODE_SIGN_IDENTITY="" 
CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO -quiet

but when I run it in travis I get this:

The command "xcodebuild clean test -project BullsEye.xcodeproj -scheme BullsEye 
-destination "platform=iOS Simulator,name=iPhone 7,OS=11" CODE_SIGN_IDENTITY="" 
CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO -quiet" exited with 70.

or with 66.

I made my scheme Shared in Xcode.

What is the problem and how can I fix it?

In logs I'm also getting:

Ineligible destinations for the "BullsEye" 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 }

and

xcodebuild: error: Unable to find a destination matching the provided destination specifier:
    { platform:iOS Simulator, OS:11, name:iPhone 7 }
The requested device could not be found because no available devices matched the request.

Upvotes: 1

Views: 413

Answers (1)

Dominic Jodoin
Dominic Jodoin

Reputation: 2538

Looking at your latest build log, the following error message

xcodebuild: error: Unable to find a destination matching the provided destination specifier:
    { platform:iOS Simulator, OS:11, name:iPhone 7 }

seems to indicate that you aren't using a valid -destination value.

Indeed, I believe that 11 isn't an accepted value for OS. Can you try with 11.0 instead? i.e. -destination "platform=iOS Simulator,name=iPhone 7,OS=11.0"

I've also submitted a PR here.

Upvotes: 1

Related Questions