Jump To:
Leopard Reference Library
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
Resource Type
Sort by
Date
PhotoSearch (HTML) (DMG) (ZIP)
Demonstrates advanced controls and cells. Custom drawing, hit testing, tracking, editing, expansion tooltips, tracking areas.
Events & Other Input Sample Code 2008-03-05
Power Management; Policy Maker vs. Power Controller (HTML) (日本語 HTML)
QA1121: Describes the differences between a Power Management Policy Maker and a Power Management Power Controller.
Events & Other Input Technical Q&As 2002-02-13
Programmatically causing restart, shutdown and/or logout (HTML) (日本語 HTML)
QA1134: Describes how to programmatically cause restart, shutdown, sleep or logout.
Events & Other Input Technical Q&As 2008-09-24
RGB Image (HTML) (DMG) (ZIP)
Demonstrates compositing to separate an NSimage into its RGB components, and how to recombine those components.
Events & Other Input Sample Code 2003-01-14
SearchField (HTML) (DMG) (ZIP)
Demonstrates how to use and customize the features of the "NSSearchField" control.
Events & Other Input Sample Code 2007-04-25
SetMouseAcclSample (HTML) (DMG) (ZIP)
Find HID System Manager and get/set cursor acceleration
Events & Other Input Sample Code 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 Sample Code 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 Sample Code 2008-08-29
Text Input Management (HTML) (PDF)
Explains how to use input servers, input managers, and text views in Cocoa.
Events & Other Input Guides 2007-02-08
Timer Programming Topics for Cocoa (HTML) (PDF)
Explains how to use timers for scheduling automatic, repeating message invocations in Cocoa.
Events & Other Input Guides 2008-11-19
ToolbarSample (HTML) (DMG) (ZIP)
Demonstrates using the Cocoa NSToolbar/NSToolbarItem API to add customizable toolbars to windows. Includes advanced custom views.
Events & Other Input Sample Code 2003-01-14
TrackBall (HTML) (DMG) (ZIP)
Demonstrates how to build a custom control based on the NSControl class.
Events & Other Input Sample Code 2007-06-07
Using Secure Event Input Fairly (HTML)
TN2150: Describes the proper use of EnableSecureEventInput.
Events & Other Input Technical Notes 2007-06-08
Why aren't my tracking rects working? (HTML)
QA1355: Describes a common mistake in setting up cursor-tracking rectangles.
Events & Other Input Technical Q&As 2004-12-02
Application File Management (HTML) (PDF)
Explains how Cocoa applications can use, manipulate, and "own" files.
File Management Guides 2006-11-07
AudioBurn (HTML) (DMG) (ZIP)
Demonstrates how to create an object conforming to the DRTrackProduction protocol to create a RedBook audio CD.
File Management Sample Code 2005-03-17
Avoiding the -42 error with DiscRecording (HTML)
QA1292: Explains how to workaround the -42 error when using the DiscRecording API.
File Management Technical Q&As 2004-05-25
ContentBurn (HTML) (DMG) (ZIP)
Creates an audio CD using standard audio files like mp3, aac, aiff, and wav.
File Management Sample Code 2003-10-27
CustomSave (HTML) (DMG) (ZIP)
Demonstrates how to customize the NSSavePanel.
File Management Sample Code 2007-06-11
DataBurn (HTML) (DMG) (ZIP)
Demonstrates how to create a DRFolder and burn it to disc.
File Management Sample Code 2005-03-17
DeskPictAppDockMenu (HTML) (DMG) (ZIP)
How to add a dynamic Dock menu to your Cocoa application
File Management Sample Code 2003-01-14
DeviceListener (HTML) (DMG) (ZIP)
Uses the DiscRecording framework to listen for device plug/unplug events and media insertion events.
File Management Sample Code 2003-07-17
Disc Recording Framework Reference (HTML)
Describes the Objective-C and C API for burning audio and data CDs and DVDs.
File Management Reference 2008-04-08
Disc Recording UI Framework Reference (HTML)
Describes the Objective-C and C API for presenting a user interface when burning audio and data CDs and DVDs.
File Management Reference 2008-04-08
DiscRecording Release Notes (HTML)
Updated for Mac OS X v10.5
File Management Release Notes 2007-10-31
EnhancedAudioBurn (HTML) (DMG) (ZIP)
This Objective-C sample demonstrates how to burn RedBook Audio CDs.
File Management Sample Code 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 Sample Code 2003-01-14
Eraser (HTML) (DMG) (ZIP)
Uses the DiscRecordingUI framework to present the standard erase, selection and progress dialogs.
File Management Sample Code 2003-01-14
Exclusive File Access in Mac OS X (HTML) (日本語 HTML)
TN2037: Covers exclusive file access In Mac OS X
File Management Technical Notes 2002-05-01
Expanding Tilde-based paths (HTML)
QA1549: Demonstrates how to resolve tilde-based relevant paths.
File Management Technical Q&As 2008-09-08
File Manager Performance and Caching (HTML)
FL16: Discusses traditional Mac OS file system input/output performance issues and the File Manager's volume cache.
File Management Technical Notes 2000-09-01
File System Overview (HTML) (PDF)
Conceptual information and guidelines describing the structure and usage of the Mac OS X file system.
File Management Guides 2008-07-11
File Wrappers with Core Data Documents (HTML) (DMG) (ZIP)
This sample demonstrates how directory file wrappers can be used with NSPersistentDocument.
File Management Sample Code 2009-04-29
FileNotification (HTML) (DMG) (ZIP)
kqueue file notification introduced in 10.3. Notification API to detect file system modifications.
File Management Sample Code 2005-10-27
filesystem_examples (HTML) (DMG) (ZIP)
Collection of command line tools illustrating filesystem features.
File Management Sample Code 2006-01-10
FSCopyObject (HTML) (DMG) (ZIP)
Copy engine for copying files and directories.
File Management Sample Code 2004-03-19
FSMegaInfo (HTML) (DMG) (ZIP)
Prints information about various file system objects; helpful when debugging VFS plug-ins.
File Management Sample Code 2008-02-25
FSSetCatalogInfo versus UID and GID (HTML) (日本語 HTML)
QA1251: Describes why FSSetCatalogInfo does not set the UID and GID of the file, and provides a work around.
File Management Technical Q&As 2003-03-26
HFS Plus Volume Format (HTML) (日本語 HTML)
TN1150: Describes the physical layout of an HFS Plus volume.
File Management Technical Notes 2004-03-05
JDragNDrop (HTML) (DMG) (ZIP)
Deprecated - Demonstrates building a simple view to implement Drag-and-Drop functionality in Cocoa-Java.
File Management Sample Code 2003-01-14
Low-Level File Management Programming Topics (HTML) (PDF)
Explains the low-level ways Cocoa applications can interact with files.
File Management Guides 2009-03-05
MoreFiles (HTML) (DMG) (ZIP)
Shows various File Manager operations (file copy, etc.) through a collection of high-level routines.
File Management Sample Code 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 Sample Code 2005-05-13
NSDirectoryEnumerator Class Reference (HTML) (PDF)
Describes the facility for enumerating the contents of a directory.
File Management Reference 2008-10-15
NSFileHandle Class Reference (HTML) (PDF)
Describes an object for accessing files or communication channels.
File Management Reference 2008-10-15
NSFileManager Class Reference (HTML) (PDF)
Describes an object that performs file-system operations.
File Management Reference 2008-10-15
NSFileWrapper Class Reference (HTML) (PDF)
Describes a representation of a file-system node.
File Management Reference 2008-10-15
NSInputStream Class Reference (HTML) (PDF)
Describes a read-only data stream.
File Management Reference 2007-04-05
NSMetadataItem Class Reference (HTML) (PDF)
Describes the metadata of a file.
File Management Reference 2006-05-23
NSMetadataQuery Class Reference (HTML) (PDF)
Describes a Spotlight query for file metadata.
File Management Reference 2007-04-02
NSMetadataQueryAttributeValueTuple Class Reference (HTML) (PDF)
Describes metadata query results.
File Management Reference 2007-04-02
NSMetadataQueryResultGroup Class Reference (HTML) (PDF)
Describes a group of metadata query result objects.
File Management Reference 2007-04-02
NSOpenPanel - Choosing any file and ignoring packages (HTML)
QA1468: Explains how to configure NSOpenPanel to filter only files and ignoring packages.
File Management Technical Q&As 2007-01-25
NSOpenPanel Class Reference (HTML) (PDF)
Describes the panel that a user employs to locate and open a file.
File Management Reference 2009-02-04
NSOutputStream Class Reference (HTML) (PDF)
Describes a write-only data stream.
File Management Reference 2009-01-06
NSSavePanel Class Reference (HTML) (PDF)
Describes the panel that a user employs to set a file-system location and save a file.
File Management Reference 2009-02-04
NSStream Class Reference (HTML) (PDF)
Describes an interface for reading and writing data.
File Management Reference 2008-10-15
ObjectPath (HTML) (DMG) (ZIP)
Demonstrates how to use the NSPathControl class.
File Management Sample Code 2007-05-22
Querying Metadata With Spotlight (HTML)
TN2192: Describes how a Cocoa application can search Spotlight metadata.
File Management Technical Notes 2007-06-04
Resolving Alias Files Quietly (HTML)
FL30: Describes how to resolve alias files on remote volumes without user interaction.
File Management Technical Notes 1999-11-01
Simplifying Data Handling with Uniform Type Identifiers (HTML)
Learn to use UTIs to take advantage of key Mac OS X technologies in your application.
File Management Articles 2005-07-12
Sorting Like the Finder (HTML)
QA1159: Shows how to sort strings like the Finder's list view.
File Management Technical Q&As 2004-10-27
SourceView (HTML) (DMG) (ZIP)
Demonstrates how to use NSOutlineView driven by NSTreeController.
File Management Sample Code 2007-11-15
Spotlight Importer Programming Guide (HTML) (PDF)
Describes the role of metadata importers and how to write them.
File Management Guides 2007-05-27
Spotlight Metadata Attributes Reference (HTML) (PDF)
Describes metadata attributes used with Spotlight.
File Management Reference 2007-05-22
Spotlight Query Programming Guide (HTML) (PDF)
Describes how to add Spotlight searching to your applications.
File Management Guides 2006-03-08
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 Sample Code 2008-06-06
Third party VFS can't unmount on Mac OS X 10.3 (HTML)
QA1308: Describes changes in unmounting behavior for VFS plug-ins under Mac OS X 10.3 "Panther."
File Management Technical Q&As 2003-10-23
Tiger Develop Overview Series: Working with Spotlight (HTML)
Learn to make the most of Spotlight's powerful search technologies within your own applications.
File Management Articles 2004-10-07
Uniform Type Identifiers Overview (HTML) (PDF)
Describes uniform type identifiers and how to use them.
File Management Guides 2008-04-08
Using UTIs to Identify Image Files (HTML)
QA1518: Explains how to use Uniform Type Identifiers to identify what files can be opened at images.
File Management Technical Q&As 2007-05-11
Verification (HTML) (DMG) (ZIP)
Objective-C example which demonstrates how to provide custom data verification for data written to disc.
File Management Sample Code 2004-01-23
Watcher (HTML) (DMG) (ZIP)
Uses FSEvents to monitor a directory hierarchy to keep track of its total size
File Management Sample Code 2006-08-04
Weak Linking To Spotlight (HTML)
QA1422: Describes a problem with weak linking to Spotlight (the Metadata framework), and its solution.
File Management Technical Q&As 2005-06-03
Animation Overview (HTML) (PDF)
Describes the animation facilities provided by Mac OS X.
Games Guides 2008-10-15
BoingX (HTML) (DMG) (ZIP)
Shows off using Quartz Extreme to provide borderless OpenGL content on the desktop.
Games Sample Code 2007-11-06
CGBitmapContextCreate Supported Color Spaces (HTML)
QA1037: Lists the color space and alpha info combinations currently supported by CGBitmapContextCreate.
Games Technical Q&As 2007-07-18
CocoaSlides (HTML) (DMG) (ZIP)
An image browser written using AppKit's Core Animation-based compositing and animation functionality
Games Sample Code 2007-11-02
Core Animation properties and Reference Counting (HTML)
QA1565: Describes a discrepancy between the property declarations in Core Animation and the actual behavior.
Games Technical Q&As 2008-11-24
CubePuzzle (HTML) (DMG) (ZIP)
Models a Rubik's Cube using Cocoa and OpenGL
Games Sample Code 2003-04-21
Developing Games on Mac OS X Using Third-Party Game Engines (HTML)
Create your own game using the powerful game engines that run on Mac OS X.
Games Articles 2006-06-05
Driving OpenGL Rendering Loops (HTML)
QA1385: Using Core Video display links (CVDisplayLink) or Cocoa timers (NSTimer) to drive an OpenGL rendering loop
Games Technical Q&As 2009-05-01
GeekGameBoard (HTML) (DMG) (ZIP)
Shows how to use Core Animation for the user interface of a board or card game.
Games Sample Code 2007-12-19
Getting the pixel data from a CGImage object (HTML)
QA1509: Describes how to access the pixel data of a CGImage object
Games Technical Q&As 2008-08-27
GLSLShowpiece (HTML) (DMG) (ZIP)
GLSLShowpiece demonstrates several Vertex and Fragment shaders
Games Sample Code 2006-07-17
How can I programmatically determine the DPI of the current video mode? (HTML) (日本語 HTML)
QA1217: Describes how to compute the DPI for a given display in a given mode using Core Graphics.
Games Technical Q&As 2002-12-02
How do I tell if a particular display is being hardware accelerated by Quartz Extreme? (HTML) (日本語 HTML)
QA1218: Describes how to use CGDisplayUsesOpenGLAcceleration to see if a display is accelerated or not.
Games Technical Q&As 2002-12-04
NSAnimation Class Reference (HTML) (PDF)
Describes the behavior of an animation.
Games Reference 2007-10-31
NSGLImage (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to texture in OpenGL with an NSImage and/or NSBitmapImageRep
Games Sample Code 2004-12-01
OpenALExample (HTML) (DMG) (ZIP)
Basic example showing OpenAL usage in a 2D OpenGL environment
Games Sample Code 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 Sample Code 2008-02-06
OpenGL Release Highlights - Mac OS X 10.3 Panther (HTML)
TN2131: Contains a list of bugs along with a short description on a release-by-release basis
Games Technical Notes 2005-02-04
Requirements for Quartz GL (HTML)
QA1536: Describes the requirements for enabling Quartz GL.
Games Technical Q&As 2008-08-08
Setting environment variables for user processes (HTML)
QA1067: Tells how to set environment variables for user processes.
Games Technical Q&As 2001-10-25
VertexPerformanceDemo (HTML) (DMG) (ZIP)
Vertex optimization demo for WWDC Session 214
Games Sample Code 2005-06-01
VideoHardwareInfo (HTML) (DMG) (ZIP)
Query VRAM, Quartz Extreme support, OpenGL extensions and renderer, GLSL version and support.
Games Sample Code 2007-05-14
Address Book Objective-C Framework Reference (HTML) (PDF)
Describes the Cocoa API for supporting and working with Address Book.
General Reference 2007-07-08
Application Kit Framework Reference (HTML) (PDF)
Describes the interface for all things related to an application's user interface.
General Reference 2008-11-19
Application Kit Reference Update (HTML) (PDF)
Summarizes the symbols added to the Application Kit framework.
General Release Notes 2007-07-18
Boinx Starts with Sample Code: FotoMagico Is a Powerful Digital Slideshow (HTML)
Starting with Apple sample code, tools and technologies, Boinx wrote FotoMagico in a matter of months.
General Articles 2007-12-11