Chapter 3. Your First iOS App

In this chapter, you’ll build a small Hello World application and run it in iPhone Simulator. If you’re enrolled in the iOS Developer Program, you’ll even get to run the application on your iOS device. 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 iOS Developer Program is separate from registering as an iOS 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 iOS device and submit them for approval to the App Store. 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 its structure. An object is a collection of operations (methods) and information (data) that occupies space in memory and can be instructed to perform operations (invoke ...

Get Learning iOS Programming, 2nd Edition now with O’Reilly online learning.

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