Effective immediately, we are deprecating xctool as the default build tool for Objective-C and Swift builds. macOS and iOS builds will now use more modern tools to build by default. Along with this change, we’re also making it easier for users to choose what simulator runs their tests.
xctool has not supported building with Xcode 8 and above, and xcodebuild has improved a lot over the last few years. Because of this, most Apple developers have moved on to using xcodebuild along with xcpretty to build and test their projects.
We want it to be easy for macOS and iOS projects to get started building and testing on Travis CI.
A big part of that is sensible defaults that make it easy to get your project running with minimal configuration.
That’s why as of today, projects with
language: objective-c or
language: swift in their .travis.yml will build and test using xcodebuild and xcpretty by default!
We think this change reflects what the Apple developer community is already doing, and it should make it easier for new projects to get up and running on Travis CI.
If your .travis.yml has a
script key that looks like this:
script: set -o pipefail && xcodebuild -project Foo.xcodeproj -scheme Foo -destination 'platform=iOS Simulator,OS=11.3,name=iPhone X' build test | xcpretty
you can now use the default script by setting a few keys:
xcode_project: Foo.xcodeproj xcode_scheme: Foo xcode_destination: platform=iOS Simulator,OS=11.3,name=iPhone X
and you’ll get the same result!
To ensure minimal breakage, Travis CI will still use xctool on our Xcode 6 and Xcode 7 images, where xctool still works for building projects. All other images now use xcodebuild and xcpretty.
Be sure to check out our Swift and Objective-C language documentation for more details on how those builds are run in Travis CI.
As always, if you have any questions, please feel free to email email@example.com.