Apple Developer Connection
Advanced Search
Member Login Log In | Not a Member? Contact ADC

Getting Started with Cocoa

Technology Overview

Cocoa helps you create commercial-grade applications quickly and efficiently. It is an advanced, mature object-oriented development environment that enables you to create complex software with surprisingly few lines of code. Through a seamless integration of tools and Cocoa API, the design and construction of a user interface is largely a matter of dragging windows, buttons, and other objects from palettes, initializing their attributes, and connecting them to other objects. Cocoa also defines a model for applications and implements most aspects of application behavior; you simply fit into this model the code that makes your application unique. The programmatic interfaces of the core Cocoa frameworks, Foundation and Application Kit, simplify access to most of the technologies on which Mac OS X is based, such as Quartz, Bonjour networking, and the printing system. These interfaces are in both Objective-C and Java. However, you can integrate code written in other languages into your Cocoa projects, including C++ code and C code. Because Objective-C is a superset of ANSI C, Carbon and other C APIs are compatible with Objective-C. If you haven’t already done so, read the ADC topic page for Cocoa.

Note: Cocoa-Java is a learning environment for developers familiar with the Java language. It is not recommended for production work. The Cocoa-Java API is no longer maintained in parallel with the Objective-C API as the latter evolves.

Start Here

You should first have a working knowledge of the C language and you should be familiar with basic programming constructs. Then, before you write a line of code, become familiar with the Cocoa environment by reading:

If you have the time, read all of Cocoa Fundamentals Guide for an orientation to Cocoa software development, including the basic concepts, terminology, design patterns, and architectures.

Choose a Learning Path

Becoming a productive Cocoa programmer begins with becoming familiar with the languages, tools, and programming interfaces. After that, you might want to integrate an existing code base into a Cocoa application.

Learning Object-Oriented Programming

The first step toward Cocoa development is learning the concepts of object-oriented programming and Objective-C, the simple yet powerful object-oriented programming language in which Cocoa is implemented:

Learning About the Development Tools

If you want to find out what the development cycle is like and how the tools work together, read Xcode Quick Tour Guide. Xcode is the name of both Apple’s integrated development environment and the application used for managing, building, and debugging projects. Also take a look at Mac OS X Technology Overview to learn more about the development tools that you use to create, build, debug, and fine-tune Cocoa programs.

If you want to know more about constructing user interfaces, read Interface Builder. The online help for the Interface Builder application also contains helpful information.

Learning About the Cocoa API

The core frameworks of Cocoa, Foundation and Application Kit, consist of hundreds of classes and thousands of methods in two languages, Objective-C and Java. To make this large API more approachable, Apple provides dozens of programming guides, overviews, and other documents. Beginning Cocoa programmers will want to read some of the following recommended documents:

Learning How to Port and Integrate Code

If you have existing code written for Carbon, UNIX, or another platform, you can often integrate much of that code base into a Cocoa application. Read the following information for guidance on porting and integrating your existing code:

Next Steps

The Cocoa Reference Library includes the following high-level resource pages, which you can bookmark for easy access:

  • Cocoa Guides

    Conceptual and how-to information for Cocoa.

  • Cocoa Reference

    Focused, detailed descriptions in reference format for Cocoa.

  • Cocoa Release Notes

    Notes containing the latest news about new or changed features in the Cocoa API.

  • Cocoa Sample Code

    Sample applications demonstrating a wide variety of Cocoa API and techniques. If you have installed the developer package or the Xcode CD, you might also want to look at the example projects in /Developer/Examples/Foundation and /Developer/Examples/AppKit.

  • Cocoa Technical Notes

    Late-breaking documents on issues related to Cocoa.

  • Cocoa Technical Q&As

    Programming tips, code snippets, and FAQs by Apple’s support engineers.

  • Mailing Lists

    The Cocoa development mailing list (cocoa-dev) is an excellent place to discuss issues or topics with fellow Cocoa developers.



Last updated: 2006-10-03




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.