Chapter 3. Your First iPhone App

In this chapter, you’ll build a small Hello World application and run it in iPhone Simulator. If you’re enrolled in the iPhone Developer Program, you’ll even get to run the application on your iPhone or iPod touch. I’m going to take you through this step by step, just to give you an idea of how Xcode and Interface Builder work together.


Enrolling in the iPhone Developer Program is separate from registering as an iPhone developer. Enrollment ($99 or $299 per year, depending on which program you join) provides you with the software certificates and online provisioning tools needed to run your own apps on your own iPhone and submit them for approval to the App Store.

However, even if you don’t plan to enroll in a Developer Program, you will need to register so that you can download the iPhone SDK needed to create apps. See Chapter 2 for more information on registering and enrolling.

Objective-C Basics

I talk in detail about how Objective-C applications are normally structured in Chapter 4. However, in this chapter, although I do get into Objective-C’s sometimes quirky syntax, I’m going to give you a higher-level overview of the language to get you going quickly.

Object-Oriented Programming

If you’ve heard someone explain object orientation before, the distinction between the terms class and object may not be totally clear. However, there is a difference. A class is the blueprint for objects; each time you create an object, the class definition determines ...

Get Learning iPhone Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.