Try Tuts+ Premium, Get Cash Back!
Continuous Integration – Tuts+ Premium
plus

Continuous Integration – Tuts+ Premium

In this tutorial series we will explore a rarely discussed (but highly valuable) process of developing software that is disappointingly absent in the iOS and mobile world: Continuous Integration. Today’s tutorial will teach you how to script your own Xcode builds!


Tutorial Teaser

Step 1: Write A Basic Bash Script

As always the best way to learn about something is to jump into it, so lets practice writing a very basic script that will print your name onto into the terminal.

Open a text editor and create a new file on your desktop called ‘BashScript.sh’ end enter the following text:

#!/bin/sh
echo "Hello world from Bash!"

You should be able to figure out what happens in this script. Firstly (and the less obviously) we specify the shell we will be using for the script, in this instance ‘sh’ (if you don’t know what a ‘shell’ is don’t worry too much, its not required to write basic Bash scripts. You just need to know that the line is there for now) The second line simply prints ‘Hello there!’ onto your terminal window.

Let’s try running it. Open a new terminal window and type the following:

. /Users/username/Desktop/BashScript.sh

If you see “Hello world from Bash!” it all worked!

Hello World From Bash!

Get the Full Series!

This tutorial series is available to Tuts+ Premium members only. Read a preview of this tutorial on the Tuts+ Premium web site or login to Tuts+ Premium to access the full content.


Joining Tuts+ Premium. . .

For those unfamiliar, the family of Tuts+ sites runs a premium membership service called Tuts+ Premium. For $19 per month, you gain access to exclusive premium tutorials, screencasts, and freebies from Mobiletuts+, Nettuts+, Aetuts+, Audiotuts+, Vectortuts+, and CgTuts+. You’ll learn from some of the best minds in the business. Become a premium member to access this tutorial, as well as hundreds of other advanced tutorials and screencasts.

Tags: Premium
Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more