# Objective-C on Travis-CI

DevFeed: [Objective-C on Travis-CI](<https://devfeed.tech/articles/objective-c-on-travis-ci-25388.md>)

Original publisher: [Read original article](<https://smileykeith.com/2013/04/11/objective-c-on-travis-ci/>)

Author: Keith Smiley

Published: 2013-04-11T22:58:00Z

Content type: tutorial

Language: en

Sources: [Keith Smiley](<https://devfeed.tech/sources/keith-smiley.md>)

Topics: [Objective-C](<https://devfeed.tech/topics/objective-c.md>), [Continuous integration](<https://devfeed.tech/topics/continuous-integration.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [Xcode](<https://devfeed.tech/topics/xcode.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [GitHub](<https://devfeed.tech/topics/github.md>), [Jenkins](<https://devfeed.tech/topics/jenkins.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [apple](<https://devfeed.tech/tags/apple.md>), [ci](<https://devfeed.tech/tags/ci.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [continuous-integration](<https://devfeed.tech/tags/continuous-integration.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [github](<https://devfeed.tech/tags/github.md>), [ios](<https://devfeed.tech/tags/ios.md>), [jenkins](<https://devfeed.tech/tags/jenkins.md>), [objective-c](<https://devfeed.tech/tags/objective-c.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [self-hosted](<https://devfeed.tech/tags/self-hosted.md>), [submodules](<https://devfeed.tech/tags/submodules.md>), [testing](<https://devfeed.tech/tags/testing.md>), [travis](<https://devfeed.tech/tags/travis.md>), [travis-ci](<https://devfeed.tech/tags/travis-ci.md>), [xcode](<https://devfeed.tech/tags/xcode.md>)

## AI overview

A practical guide to configuring Travis CI for Objective-C projects targeting OS X and iOS. It covers repository setup, the .travis.yml configuration file, Xcode shared schemes and test targets, dependency handling, and additional scripts for projects using CocoaPods or submodules.

## Source excerpt

Recently Travis added support for Objective-C and there for OS X and iOS projects for continuous integration testing. I gather that people have previously done this with self-hosted dedicated Jenkins machines but since Apple is so aggressive about dropping support for previous versions of the OS it seems like a pain to have to replace your build server every few years. Enter Travis, a great hosted continuous integration server that hosts a huge amount of open source projects. I figured with this new support I could host some of my smaller libraries just to set how well it worked. The initial setup process was a bit tedious but I eventually got it to work. Assumtions: You have a test framework already integrated with your project (I like Specta/Expecta) You have your project on Github in a public repository. Travis offers a pro account if you'd rather Steps Create a .travis.yml file in the root of your repository (leading dot is intentional). For many projects a file may just look like: language: objective-c By default Travis runs this script for Objective-C projects I was informed on Twitter that the current script that runs Objective-C projects is actually located here. It was originally created by Justin Spahr-Summers here. This script seems to run my projects without any issue, they just occasionally require more initial setup (we'll get to that). Enable your repository in Travis' settings. From your Travis profile page (after signing in with Github) you should see a list of your repositories, you may have to press 'Sync now', where you can switch on the repository you're planning on adding. Configure your project within Xcode. As I assumed above you already have a test target setup. You do have to do a few things in Xcode to make everything work correctly. Go to 'Manage Schemes' in Xcode. Check the 'Shared' box for the scheme that needs to be run. Click 'Edit...' in the bottom left and go to your build action. On the row of your Tests target check the box in the '