WilliamZang
WilliamZang

Reputation: 300

How can I change xctool destination in Travis CI

The fail build is https://travis-ci.org/WilliamZang/FastAnimationWithPOP/jobs/30449252

I've no idea why it is fail.

I try the build xctool -workspace FastAnimationWithPop.xcworkspace -scheme FastAnimationWithPopDemo -sdk iphonesimulator build test, it's the same result.

I find the solution is add a arg '-destination "platform=iOS Simulator,name=iPhone Retina (4-inch)"', it make my building success. But I don't know why it works and how to add this arg to travis.yml.

I know the reason is 'xctool -workspace FastAnimationWithPop.xcworkspace -scheme FastAnimationWithPopDemo -sdk iphonesimulator build test' only open the iphonesimulator 6. Even I specify iphonesimulator7.1 it still use iphonesimulator6. I don't know why it always use simulator 6.

It tastes me about 1 day, who can save me?

Upvotes: 2

Views: 486

Answers (1)

sarahhodne
sarahhodne

Reputation: 10114

You can do this to add the -destination flag to your xctool call (in the .travis.yml):

xctool_args: -destination "platform=iOS Simulator,name=iPhone Retine (4-inch)"

We automatically launch the simulator at the start of the build, and it sounds like we might be starting an old simulator.

Upvotes: 4

Related Questions