Install Xcode 4 and create a new project

To develop apps for the iPhone/iPad running iOS, you’ll need a Mac running at least Mac OS X 10.6.

Apple’s development tools are called Xcode. This tutorial is for the latest Xcode 4. Please note that you’ll find lots of information on the internet which is valid only for version 3 or 4 of Xcode.

To run your apps on hardware devices, you need to be member in the iOS Developer Program (99$/year). If you are member in the developer program, you can download Xcode 4 here. If you’re not a member, you can still get Xcode 4 for free in the Mac App Store and run your apps in the simulator on the Mac.

So, first step is to download and install Xcode 4 and to run it from /Developer/Applications/Xcode:

Xcode

Choose to create a new project.

Choose iOS > Application > Window-based Application. This is the most simple template for iOS apps. In this tutorial, I intend to show what’s going on and explain all the moving parts in the background. So while there are more suitable templates to build actual apps, please follow along using the bare-boned Window-based Application template.

In this tutorial, I’m going to develop a shopping list app, so if you want to follow along, name your project ‘ShoppingList’. Company Identifier should be a domain name written the other way round. I’m going to use com.example, feel free to use your own domain name. Choose iPhone for Device Family (for the moment, this will be an iPhone-only app) and uncheck Use Core Data (a database framework, we don’t need this right now) and uncheck Include Unit Tests (we will do unit tests only in a later chapter):

Creating a new iPhone project

We now have a new iPhone project.

Ralf Ebert

Ralf Ebert is an independent software developer and trainer. He makes apps for Mac OS X and iOS and offers iOS and Git training courses for software developers.