Date
Sep. 8th, 2024
 
2024年 8月 6日

Post: Travis CI and iOS Projects

Travis CI and iOS Projects

Published 12:06 Jun 09, 2013.

Created by @ezra. Categorized in #Programming, and tagged as #iOS.

Source format: Markdown

Table of Content

Travis is a Continuos Integration platform targeted to the Open Source Community. Among many other languages, it now supports Objective-C projects, but its lack of documentation can give the impression that it is a difficult task to achieve while in fact it quite simple. Find out how simple it is to configure your iOS Xcode project hosted in Github in 3 steps:

1. Configuration File

All Travis projects start with a YAML configuration file named travis.yml. An iOS project actually requires a very simple one:

language:objective-c
before_script:
  - cd TwinkleStarExample   # in case your project resides in a sub-directory
xcode_sdk: iphonesimulator

The xcode_sdk: line is important to avoid the error:

Code Sign error: The identity 'iPhone Developer' doesn't match any valid, non-expired certificate/private key pair in your keychains

2. Shared Schemes

Ensure the schemes of your target are Shared. This option makes a scheme visible to anyone using that project. To enable it, go to the menu: Product > Scheme > Manage Schemes.

Xcode's Manage Schemes

This prevents the following error:

xcodebuild: error: The project 'PROJECT_NAME' does not contain a scheme named 'SCHEME_NAME'.

3. Success

Writing a configuration file and making a few clicks in Xcode are for sure exhausting!

Reward yourself by opening a can of Cola and start enjoying the benefits of continuous integrated builds. :)

For some examples, refer to some of my iOS repositories in Github:

Pinned Message
HOTODOGO
The Founder and CEO of Infeca Technology.
Developer, Designer, Blogger.
Big fan of Apple, Love of colour.
Feel free to contact me.
反曲点科技创始人和首席执行官。
程序猿、设计师、奇怪的博主。
苹果死忠、热爱色彩斑斓的世界。
如有意向请随时 与我联系