4. Your First Objective-C Program

The previous chapter introduced the concepts of object-oriented programming and covered the basic syntax of Objective-C. This chapter puts those concepts and syntax to work in a simple program. Following tradition, this program will be a “Hello World” program, but with a twist: It will be an object-oriented “Hello World” program. The chapter will examine the program line by line. You should follow along by building the program yourself using Xcode, Apple’s Integrated Development Environment (IDE).


An IDE is a program that manages all aspects of application development including file-management, code writing and editing, compiling, linking, and debugging. Xcode, Apple’s IDE, runs on Mac OS X and is used ...

Get Learning Objective-C 2.0: A Hands-On Guide to Objective-C for Mac and iOS Developers now with O’Reilly online learning.

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