This document introduces the Cocoa application environment using the Objective-C language and teaches you how to use the Xcode Tools development suite to build robust, object-oriented applications. Cocoa provides the best way to build modern, multimedia-rich, object-oriented applications for consumers and enterprise customers alike. This document assumes you are familiar with C programming but does not assume you have previous experience with Cocoa or Xcode Tools.
This document is intended for programmers interested in developing Cocoa applications or for people curious about Cocoa.
This document uses Xcode 3.2 running on Mac OS X version 10.6.
This document consists of the following chapters:
“The Essence of Cocoa” introduces basic concepts whose understanding is required when developing Cocoa applications.
“Creating a Project in Xcode” guides you through creating a project using Xcode.
“Defining the Model” guides you through defining the underlying functionality of an application.
“Defining the View: Building the User Interface” guides you through the development of a basic user interface using Interface Builder.
“Bridging the Model and View: The Controller” shows how to create a controller object to mediate communication between the model and view.
“Building and Running Your Application” explains how to build and test the application.
“Configuring Your Application” explains how to configure the basic identifying properties that application bundles require, including the version information and application icon.
“Expanding on the Basics” explains some of the behavior Cocoa applications get by default.
Throughout this tutorial you will learn:
What Cocoa is
What the application development process looks like in an object-oriented environment
How to make a Cocoa application
Where to go from here by adapting your knowledge
In order to maximize the instructional potential of this document, you should know C but not necessarily object-oriented programming or application design.
To help you troubleshoot problems as you follow the tutorial, this document includes the finalized Currency Converter project as a companion archive (ObjCTutorial_companion.zip
). The archive also contains files needed to follow some of the instructions in this document.
The Xcode development environment is part of the Mac OS X installation media or available for download from developer.apple.com. You must install Xcode on your computer before following the instructions in this document.
These documents provide detailed information on Cocoa development:
Getting Started with Cocoa provides a road map for learning Cocoa.
Cocoa Fundamentals Guide describes the Cocoa application environment.
The Objective-C Programming Language introduces Objective-C and describes the Objective-C runtime system, which is the basis of much of Cocoa’s dynamic behavior and extensibility.
Apple Human Interface Guidelines explains how to lay out user interface elements to provide a pleasant user experience.
Last updated: 2009-08-03