RileyE
RileyE

Reputation: 11074

Travis builds failing - Reason: The run destination iPad 2 is not valid for Testing the scheme 'UIKitPlus-Example'

I'm having some trouble with my cocoapods running Travis CI. Everything seems to install correctly, but the xcodebuild script fails

$ set -o pipefail && xcodebuild test -workspace Example/UIKitPlus.xcworkspace -scheme UIKitPlus-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c
xcodebuild: error: Failed to build workspace UIKitPlus with scheme UIKitPlus-Example.
    Reason: The run destination iPad 2 is not valid for Testing the scheme 'UIKitPlus-Example'.
The command "set -o pipefail && xcodebuild test -workspace Example/UIKitPlus.xcworkspace -scheme UIKitPlus-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c" exited with 70.

https://travis-ci.org/JamieREvans/UIKitPlus/builds/54649639

I'm not sure why this is failing, because I can run my tests on the iPad 2 simulator, using that scheme, without any issues.

Is this a Travis issue or is my Travis script wrong?

Upvotes: 2

Views: 447

Answers (1)

Maxime Epain
Maxime Epain

Reputation: 381

I've managed to get it build by adding a destination to the xcodebuild command line, e.g. -destination "platform=iOS Simulator,name=iPhone 6"

Upvotes: 4

Related Questions