Jump To:
Leopard Sample Code
Cocoa is an object-oriented application environment designed for developing Mac OS X native applications. The Cocoa frameworks support rapid development and high productivity. Cocoa provides developers starting new Mac OS X projects the fastest way to full-featured implementations. Applications from other platforms can also be brought to Mac OS X quickly using Cocoa.

A guided introduction and learning path for developers new to Cocoa.   Essential information for developers using Objective-C.   Objective-C API references organized by framework.
Document Descriptions
On Off
Display

Sort by
Title
Sorted by
Topic
Sort by
Date
Dicey (HTML) (DMG) (ZIP)
Dicey is a dice game project that demonstrates various techniques for making a Cocoa application accessible.
Accessibility 2006-08-01
ImageMapExample (HTML) (DMG) (ZIP)
Implements a custom NSView, an image map, and accessorizes it (i.e. makes it work with accessibility).
Accessibility 2005-06-01
SetMouseAcclSample (HTML) (DMG) (ZIP)
Find HID System Manager and get/set cursor acceleration
Accessibility 2006-11-28
TrackBall (HTML) (DMG) (ZIP)
Demonstrates how to build a custom control based on the NSControl class.
Accessibility 2007-06-07
UIElementInspector (HTML) (DMG) (ZIP)
Demonstrates using the Accessibility API introduced in Mac OS X 10.2, which allows manipulation of an application's UI.
Accessibility 2007-02-19
ABPresence (HTML) (DMG) (ZIP)
Displays a list of all the people in your Address Book and their iChat status.
Apple Applications 2006-08-04
CocoaPeoplePicker (HTML) (DMG) (ZIP)
Demonstrates how to use the AddressBook framework's ABPeoplePickerView.
Apple Applications 2003-12-11
NameAndAddress (HTML) (DMG) (ZIP)
A single window utility that gets a host name from an IP address or an IP address from a hostname.
Apple Applications 2003-01-14
SimpleCalendar (HTML) (DMG) (ZIP)
Uses the Calendar Store framework to fetch iCal events and display them on a custom calendar.
Apple Applications 2006-07-27
StickiesExample (HTML) (DMG) (ZIP)
Contains sample code and tools used by Sync Services Tutorial to demonstrate debugging syncing applications.
Apple Applications 2006-08-08
UnsharpMask (HTML) (DMG) (ZIP)
Demonstrates how to build Automator actions using Cocoa frameworks.
Apple Applications 2005-06-06
AudioDeviceNotify (HTML) (DMG) (ZIP)
Demonstrates how to enumerate audio devices attached to the system and how to handle device notifications
Audio 2006-04-21
ExtractMovieAudioToAIFF (HTML) (DMG) (ZIP)
Demonstrates how to extract audio from QuickTime Movies and write the data to an AIFF file.
Audio 2006-03-31
MP3 Player (HTML) (DMG) (ZIP)
How to wrap a command-line UNIX/Linux application in a Cocoa GUI, calling a the command-line app through NSTask.
Audio 2003-01-14
QTAudioContextInsert (HTML) (DMG) (ZIP)
Demonstrates use of Audio Context Insert APIs to perform custom processing on QuickTime's audio stream.
Audio 2008-01-21
TremoloUnit (HTML) (DMG) (ZIP)
Audio unit sample demonstrating how to build an effect unit with a generic view.
Audio 2006-10-26
WhackedTV (HTML) (DMG) (ZIP)
A Cocoa version of the venerable HackTV sample code, demonstrating usage of the Sequence Grabber API's
Audio 2008-05-09
AbstractTree (HTML) (DMG) (ZIP)
Using NSTreeController with NSOutlineView, Bindings, and Core Data.
Data Management 2008-03-17
BindingsJoystick (HTML) (DMG) (ZIP)
Illustrates a bindings-enabled subclass of NSView.
Data Management 2005-06-01
Bound Button (HTML) (DMG) (ZIP)
Illustrates using Cocoa bindings to bind a button's target and action parameters.
Data Management 2007-06-08
Core Data HTML Store (HTML) (DMG) (ZIP)
Implementation of a Core Data atomic store based on HTML tables
Data Management 2007-06-01
CoreRecipes (HTML) (DMG) (ZIP)
Demonstrates the use of Core Data (persistency and object-graph management) with a variety of application projects.
Data Management 2005-06-01
CustomAtomicStoreSubclass (HTML) (DMG) (ZIP)
Illustrates the implementation of a custom Core Data atomic store.
Data Management 2007-06-08
Departments and Employees (HTML) (DMG) (ZIP)
Source code for NSPersistentDocument Core Data Tutorial.
Data Management 2007-05-31
DerivedProperty (HTML) (DMG) (ZIP)
Illustrates use of Core Data derived properties to make searching against string data more efficient.
Data Management 2008-06-04
DictionaryController (HTML) (DMG) (ZIP)
"DictionaryController" is a Cocoa application that demonstrates various ways in how to use the NSDictionaryController class.
Data Management 2007-12-20
File Wrappers with Core Data Documents (HTML) (DMG) (ZIP)
This sample demonstrates how directory file wrappers can be used with NSPersistentDocument.
Data Management 2009-04-29
Image Kit with Core Data (HTML) (DMG) (ZIP)
Using Image Kit's browser view with Core Data content.
Data Management 2008-07-25
iSpend (HTML) (DMG) (ZIP)
Demonstrates how to incorporate a number of Cocoa Tiger features into a simple application.
Data Management 2005-06-01
JDragNDrop (HTML) (DMG) (ZIP)
Deprecated - Demonstrates building a simple view to implement Drag-and-Drop functionality in Cocoa-Java.
Data Management 2003-01-14
LSMSmartCategorizer (HTML) (DMG) (ZIP)
Demonstrates the Latent Semantic Mapping (LSM) framework by automatically categorize RSS feeds.
Data Management 2007-05-09
ManagedObjectDataFormatter (HTML) (DMG) (ZIP)
A Data Formatter for Xcode 2.0 and 2.1 that displays NSManagedObject * variables.
Data Management 2005-06-01
NewsReader (HTML) (DMG) (ZIP)
Demonstrates use of the Publication Subscription framework to create a simple RSS reader application.
Data Management 2007-06-01
People (HTML) (DMG) (ZIP)
This program demonstrates the use of the SyncServices framework.
Data Management 2005-06-01
PhotoSearch (HTML) (DMG) (ZIP)
Demonstrates advanced controls and cells. Custom drawing, hit testing, tracking, editing, expansion tooltips, tracking areas.
Data Management 2008-03-05
PrefsPane (HTML) (DMG) (ZIP)
A Cocoa sample System Preferences bundle that demonstrates how to use the NSPreferencePane class.
Data Management 2007-06-06
Simple Bindings Adoption (HTML) (DMG) (ZIP)
A simple example that illustrates the adoption of Cocoa Bindings.
Data Management 2007-06-07
TwoManyControllers (HTML) (DMG) (ZIP)
How to use an intermediate NSArrayController to populate an NSTableView across two to-many relationships.
Data Management 2007-02-23
With and Without Bindings (HTML) (DMG) (ZIP)
Illustrates the adoption of Cocoa Bindings and refactoring using a subclass of NSArrayController.
Data Management 2008-01-04
BindingsJoystick (HTML) (DMG) (ZIP)
Illustrates a bindings-enabled subclass of NSView.
Design Guidelines 2005-06-01
BundleLoader (HTML) (DMG) (ZIP)
Demonstrates how to load multiple Cocoa bundles or NSBundles (also known as plug-ins) into the main NSApplication.
Design Guidelines 2007-09-21
Cocoa_With_Carbon_or_CPP (HTML) (DMG) (ZIP)
Shows how to call Carbon routines and C++ code from within an Objective-C Cocoa program.
Design Guidelines 2007-02-05
PrefsPane (HTML) (DMG) (ZIP)
A Cocoa sample System Preferences bundle that demonstrates how to use the NSPreferencePane class.
Design Guidelines 2007-06-06
SimpleCocoaApp (HTML) (DMG) (ZIP)
A basic Cocoa application for beginners to Cocoa and Objective-C.
Design Guidelines 2007-08-07
Squiggles (HTML) (DMG) (ZIP)
Demonstrates many Cocoa fundamentals in a Document-based Application featuring custom drawing and event-handling.
Design Guidelines 2008-08-29
TrackBall (HTML) (DMG) (ZIP)
Demonstrates how to build a custom control based on the NSControl class.
Design Guidelines 2007-06-07
TwoManyControllers (HTML) (DMG) (ZIP)
How to use an intermediate NSArrayController to populate an NSTableView across two to-many relationships.
Design Guidelines 2007-02-23
With and Without Bindings (HTML) (DMG) (ZIP)
Illustrates the adoption of Cocoa Bindings and refactoring using a subclass of NSArrayController.
Design Guidelines 2008-01-04
BindingsJoystick (HTML) (DMG) (ZIP)
Illustrates a bindings-enabled subclass of NSView.
Events & Other Input 2005-06-01
CarbonCocoaTempConverter (HTML) (DMG) (ZIP)
Demonstrates how to integrate Carbon and Cocoa user interfaces in the same Cocoa application.
Events & Other Input 2008-03-10
CarbonInCocoa (HTML) (DMG) (ZIP)
How to use Carbon GUI code in a Cocoa application.
Events & Other Input 2003-03-26
CocoaDragAndDrop (HTML) (DMG) (ZIP)
Implement Drag-and-Drop functionality in Cocoa (uses images; can be extended to support other data types).
Events & Other Input 2003-01-14
Color Sampler (HTML) (DMG) (ZIP)
Demonstrates one way to sample the color at a given point in an NSView.
Events & Other Input 2003-01-14
ColorSyncDevices-Cocoa (HTML) (DMG) (ZIP)
Demonstrates how to use the new ColorSync Device Manager routines in the Cocoa environment.
Events & Other Input 2003-01-14
CrossEvents (HTML) (DMG) (ZIP)
Demonstrates how to send CarbonEvents and NSNotifications between Carbon and Cocoa.
Events & Other Input 2007-05-31
Dicey (HTML) (DMG) (ZIP)
Dicey is a dice game project that demonstrates various techniques for making a Cocoa application accessible.
Events & Other Input 2006-08-01
FunkyOverlayWindow (HTML) (DMG) (ZIP)
Demonstrates several window layering, transparency and widget interaction techniques in Cocoa.
Events & Other Input 2003-05-08
JDragNDrop (HTML) (DMG) (ZIP)
Deprecated - Demonstrates building a simple view to implement Drag-and-Drop functionality in Cocoa-Java.
Events & Other Input 2003-01-14
NumberInput_IMKit_Sample (HTML) (DMG) (ZIP)
Illustrates an input method that uses the Mac OS X 10.5 InputMethodKit framework.
Events & Other Input 2008-03-17
PhotoSearch (HTML) (DMG) (ZIP)
Demonstrates advanced controls and cells. Custom drawing, hit testing, tracking, editing, expansion tooltips, tracking areas.
Events & Other Input 2008-03-05
RGB Image (HTML) (DMG) (ZIP)
Demonstrates compositing to separate an NSimage into its RGB components, and how to recombine those components.
Events & Other Input 2003-01-14
SearchField (HTML) (DMG) (ZIP)
Demonstrates how to use and customize the features of the "NSSearchField" control.
Events & Other Input 2007-04-25
SetMouseAcclSample (HTML) (DMG) (ZIP)
Find HID System Manager and get/set cursor acceleration
Events & Other Input 2006-11-28
SonOfSillyBalls (HTML) (DMG) (ZIP)
Draws a bunch of randomly colored, randomly placed, silly balls in a window on the screen.
Events & Other Input 2003-01-14
Squiggles (HTML) (DMG) (ZIP)
Demonstrates many Cocoa fundamentals in a Document-based Application featuring custom drawing and event-handling.
Events & Other Input 2008-08-29
ToolbarSample (HTML) (DMG) (ZIP)
Demonstrates using the Cocoa NSToolbar/NSToolbarItem API to add customizable toolbars to windows. Includes advanced custom views.
Events & Other Input 2003-01-14
TrackBall (HTML) (DMG) (ZIP)
Demonstrates how to build a custom control based on the NSControl class.
Events & Other Input 2007-06-07
AudioBurn (HTML) (DMG) (ZIP)
Demonstrates how to create an object conforming to the DRTrackProduction protocol to create a RedBook audio CD.
File Management 2005-03-17
ContentBurn (HTML) (DMG) (ZIP)
Creates an audio CD using standard audio files like mp3, aac, aiff, and wav.
File Management 2003-10-27
CustomSave (HTML) (DMG) (ZIP)
Demonstrates how to customize the NSSavePanel.
File Management 2007-06-11
DataBurn (HTML) (DMG) (ZIP)
Demonstrates how to create a DRFolder and burn it to disc.
File Management 2005-03-17
DeskPictAppDockMenu (HTML) (DMG) (ZIP)
How to add a dynamic Dock menu to your Cocoa application
File Management 2003-01-14
DeviceListener (HTML) (DMG) (ZIP)
Uses the DiscRecording framework to listen for device plug/unplug events and media insertion events.
File Management 2003-07-17
EnhancedAudioBurn (HTML) (DMG) (ZIP)
This Objective-C sample demonstrates how to burn RedBook Audio CDs.
File Management 2005-07-06
EnhancedDataBurn (HTML) (DMG) (ZIP)
Objective-C sample which shows how to burn a data disc containing a complete virtual filesystem.
File Management 2003-01-14
Eraser (HTML) (DMG) (ZIP)
Uses the DiscRecordingUI framework to present the standard erase, selection and progress dialogs.
File Management 2003-01-14
File Wrappers with Core Data Documents (HTML) (DMG) (ZIP)
This sample demonstrates how directory file wrappers can be used with NSPersistentDocument.
File Management 2009-04-29
FileNotification (HTML) (DMG) (ZIP)
kqueue file notification introduced in 10.3. Notification API to detect file system modifications.
File Management 2005-10-27
filesystem_examples (HTML) (DMG) (ZIP)
Collection of command line tools illustrating filesystem features.
File Management 2006-01-10
FSCopyObject (HTML) (DMG) (ZIP)
Copy engine for copying files and directories.
File Management 2004-03-19
FSMegaInfo (HTML) (DMG) (ZIP)
Prints information about various file system objects; helpful when debugging VFS plug-ins.
File Management 2008-02-25
JDragNDrop (HTML) (DMG) (ZIP)
Deprecated - Demonstrates building a simple view to implement Drag-and-Drop functionality in Cocoa-Java.
File Management 2003-01-14
MoreFiles (HTML) (DMG) (ZIP)
Shows various File Manager operations (file copy, etc.) through a collection of high-level routines.
File Management 2003-01-14
MoreFilesX (HTML) (DMG) (ZIP)
Deprecated - Shows various File Manager operations through a collection of high-level routines using HFS Plus APIs.
File Management 2005-05-13
ObjectPath (HTML) (DMG) (ZIP)
Demonstrates how to use the NSPathControl class.
File Management 2007-05-22
SourceView (HTML) (DMG) (ZIP)
Demonstrates how to use NSOutlineView driven by NSTreeController.
File Management 2007-11-15
SpotlightFortunes (HTML) (DMG) (ZIP)
Demonstrates how to provision a Spotlight importer plug-in for a custom UTI, and how to use a NSMetadataQuery with bindings to display live query results in a table view.
File Management 2008-06-06
Verification (HTML) (DMG) (ZIP)
Objective-C example which demonstrates how to provide custom data verification for data written to disc.
File Management 2004-01-23
Watcher (HTML) (DMG) (ZIP)
Uses FSEvents to monitor a directory hierarchy to keep track of its total size
File Management 2006-08-04
BoingX (HTML) (DMG) (ZIP)
Shows off using Quartz Extreme to provide borderless OpenGL content on the desktop.
Games 2007-11-06
CocoaSlides (HTML) (DMG) (ZIP)
An image browser written using AppKit's Core Animation-based compositing and animation functionality
Games 2007-11-02
CubePuzzle (HTML) (DMG) (ZIP)
Models a Rubik's Cube using Cocoa and OpenGL
Games 2003-04-21
GeekGameBoard (HTML) (DMG) (ZIP)
Shows how to use Core Animation for the user interface of a board or card game.
Games 2007-12-19
GLSLShowpiece (HTML) (DMG) (ZIP)
GLSLShowpiece demonstrates several Vertex and Fragment shaders
Games 2006-07-17
NSGLImage (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to texture in OpenGL with an NSImage and/or NSBitmapImageRep
Games 2004-12-01
OpenALExample (HTML) (DMG) (ZIP)
Basic example showing OpenAL usage in a 2D OpenGL environment
Games 2005-06-01
OpenGL Filter Basics Cocoa (HTML) (DMG) (ZIP)
How to use Objective-C and MVC design patterns in installing and utilizing filters in an OpenGL rendering pipeline
Games 2008-02-06
VertexPerformanceDemo (HTML) (DMG) (ZIP)
Vertex optimization demo for WWDC Session 214
Games 2005-06-01
VideoHardwareInfo (HTML) (DMG) (ZIP)
Query VRAM, Quartz Extreme support, OpenGL extensions and renderer, GLSL version and support.
Games 2007-05-14
BasicCocoaAnimations (HTML) (DMG) (ZIP)
"BasicCocoaAnimations" demonstrates the use of the animator proxy to easily animate Cocoa views and windows.
Graphics & Imaging 2007-06-11