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
Sort by
Topic
Sorted by
Date
QTExtractAndConvertToAIFF (HTML) (DMG) (ZIP)
Demonstrates using MovieAudioExtraction and an AudioConverter to extract and convert audio to a AIFF file.
QuickTime 2006-11-08
QTExtractAndConvertToMovieFile (HTML) (DMG) (ZIP)
Demonstrates using MovieAudioExtraction and an AudioConverter to extract and convert audio to a QuickTime movie file.
QuickTime 2006-11-08
NSFontAttributeExplorer (HTML) (DMG) (ZIP)
Demonstrates how to gather and display various metric information for installed fonts using NSFont.
Text & Fonts 2006-10-26
TremoloUnit (HTML) (DMG) (ZIP)
Audio unit sample demonstrating how to build an effect unit with a generic view.
Audio 2006-10-26
MyCustomColorPicker (HTML) (DMG) (ZIP)
Shows how to write a custom color picker using Cocoa.
Graphics & Imaging, User Experience 2006-10-09
CarbonQuartzComposer_TV (HTML) (DMG) (ZIP)
Demonstrates how to integrate Cocoa based QuartzComposer window into a Carbon based application
Graphics & Imaging, Porting 2006-10-02
ImageBackground (HTML) (DMG) (ZIP)
Shows how to draw an image in the background of an NSOutlineView and NSTableView.
Graphics & Imaging, User Experience 2006-10-02
Quartz2DBasics (HTML) (DMG) (ZIP)
Carbon and Cocoa sample code demonstrating some basic usage of the Quartz 2D API
Graphics & Imaging 2006-09-11
StickiesExample (HTML) (DMG) (ZIP)
Contains sample code and tools used by Sync Services Tutorial to demonstrate debugging syncing applications.
Apple Applications, Syncing, User Experience 2006-08-08
QCFundamentals (HTML) (DMG) (ZIP)
Demonstrates Coordinate, Interpolation, and Iterative systems in Quartz Composer with an amusing animation
Graphics & Imaging 2006-08-07
QCGalaxy (HTML) (DMG) (ZIP)
Demonstrates use of Particle Systems and Core Image Filters in Quartz Composer
Graphics & Imaging 2006-08-07
ABPresence (HTML) (DMG) (ZIP)
Displays a list of all the people in your Address Book and their iChat status.
Apple Applications, Interapplication Communication 2006-08-04
SayIt (HTML) (DMG) (ZIP)
Web Kit plug-in which speaks text passed via JavaScript
Internet & Web 2006-08-04
Watcher (HTML) (DMG) (ZIP)
Uses FSEvents to monitor a directory hierarchy to keep track of its total size
File Management 2006-08-04
WebKitDOMElementPlugIn (HTML) (DMG) (ZIP)
A Web Kit plug-in that modifies its own DOM element style
Internet & Web 2006-08-04
Dicey (HTML) (DMG) (ZIP)
Dicey is a dice game project that demonstrates various techniques for making a Cocoa application accessible.
Accessibility, Events & Other Input 2006-08-01
DynamicProperties (HTML) (DMG) (ZIP)
Demonstrates dynamically resolved properties, using a new Objective C 2.0 feature: dynamically resolved methods.
Objective-C Language 2006-08-01
LiveVideoMixer3 (HTML) (DMG) (ZIP)
LiveVideoMixer3 is extended to support Video In via QTKit
Graphics & Imaging, QuickTime 2006-08-01
MethodReplacement (HTML) (DMG) (ZIP)
Demonstrates an Objective C 2 compatible way to replace a method in an existing Objective C class.
Objective-C Language 2006-08-01
QTKitButtonTester (HTML) (DMG) (ZIP)
Shows how to use the QTMovieView methods for hiding and showing the buttons in the movie controller bar.
QuickTime 2006-08-01
QTKitThreadedExport (HTML) (DMG) (ZIP)
Shows how to export a QTMovie on a background thread.
QuickTime 2006-08-01
QTNoStepsDemo (HTML) (DMG) (ZIP)
Shows how to subclass QTMovieView to override its default behaviors.
QuickTime 2006-08-01
TrackFormatDemo (HTML) (DMG) (ZIP)
Shows how to get a human-readable, localized description of a track's format.
QuickTime 2006-08-01
WritableFileDemo (HTML) (DMG) (ZIP)
Shows how to create an empty, writable file associated with a QTMovie object.
QuickTime 2006-08-01
PDF Annotation Editor (HTML) (DMG) (ZIP)
Demonstrates how to use PDF Kit to examine, edit, and create PDF annotations.
Graphics & Imaging 2006-07-31
PDF Calendar (HTML) (DMG) (ZIP)
Demonstrates how to use PDF Kit to create PDF content.
Graphics & Imaging 2006-07-31
AttachAScript (HTML) (DMG) (ZIP)
Illustrates how you can extend any Cocoa application by adding some AppleScripts to it.
Interapplication Communication 2006-07-27
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
CarbonCocoaCoreImageTab (HTML) (DMG) (ZIP)
Carbon-based application creates a Cocoa-based web window which used CoreImage filters to transition between tabbed WebViews
Graphics & Imaging, Internet & Web 2006-07-25
GLSLShowpiece (HTML) (DMG) (ZIP)
GLSLShowpiece demonstrates several Vertex and Fragment shaders
Games, Graphics & Imaging 2006-07-17
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, QuickTime 2006-03-31
DragItemAround (HTML) (DMG) (ZIP)
Illustrates creating a custom subclass of NSView.
Graphics & Imaging 2006-03-16
SpecialPictureProtocol (HTML) (DMG) (ZIP)
Use a custom NSURLProtocol to create jpeg images in memory for display in a webView.
Internet & Web 2006-03-13
CheckExecutableArchitecture (HTML) (DMG) (ZIP)
Determine whether a particular Mach-O executable contains a version suitable for executing on a given processor architecture.
Runtime Architecture 2006-02-07
SillyFrequencyLevels (HTML) (DMG) (ZIP)
Demonstrates how to obtain audio frequency levels from a Movie using SetMovieAudioFrequencyMeteringNumBands and GetMovieAudioFrequencyLevels APIs.
QuickTime 2006-01-25
filesystem_examples (HTML) (DMG) (ZIP)
Collection of command line tools illustrating filesystem features.
File Management 2006-01-10
QTKitMovieShuffler (HTML) (DMG) (ZIP)
Demonstrates a simple QTKit movie player application.
QuickTime 2006-01-03
ThreadsExportMovie (HTML) (DMG) (ZIP)
Demonstrates movie exporting using the QuickTime movie export component on separate threads of a Cocoa application.
QuickTime 2006-01-03
FileNotification (HTML) (DMG) (ZIP)
kqueue file notification introduced in 10.3. Notification API to detect file system modifications.
File Management 2005-10-27
GetPrimaryMACAddress (HTML) (DMG) (ZIP)
Demonstrates retrieving the MAC address of the built-in Ethernet controller. Useful for uniquely identifying a Macintosh system.
Networking, Security 2005-10-27
LoginItemsAE (HTML) (DMG) (ZIP)
Uses Apple events to manipulate the list of login items (items launched when you log in).
Process Management 2005-10-17
CocoaInCarbon (HTML) (DMG) (ZIP)
Demonstrates using Cocoa GUI code in a Carbon application.
Runtime Architecture 2005-10-04
QTQuartzPlayer (HTML) (DMG) (ZIP)
QTQuartzPlayer demonstrates how to render QuickTime Movies and live video with OpenGL and CoreVideo.
QuickTime 2005-10-04
PasteboardPeeker (HTML) (DMG) (ZIP)
Using pasteboards for Copy and Paste, Drag and Drop, service support and filter services.
Interapplication Communication, Text & Fonts 2005-08-10
PDFKitLinker2 (HTML) (DMG) (ZIP)
Demonstrates many aspects of PDFKit including navigation, display modes, searching, and PDFView subclassing.
Graphics & Imaging 2005-08-10
SpellingChecker-CocoaCarbon (HTML) (DMG) (ZIP)
Demonstrates how to call NSSpellChecker cocoa routines from a Carbon application.
Runtime Architecture 2005-08-10
CIAnnotation (HTML) (DMG) (ZIP)
Image annotation application using Core Image Filters. Demonstrates creation and usage of Image Units.
Graphics & Imaging 2005-08-01
VideoViewer (HTML) (DMG) (ZIP)
Simple example of video rendering using QuickTime visual contexts, OpenGL, Core Video and Core Image.
Graphics & Imaging, QuickTime 2005-08-01
ThreadsExporter (HTML) (DMG) (ZIP)
Demonstrates importing and exporting still images in different formats on separate threads.
QuickTime 2005-07-26
BackgroundExporter (HTML) (DMG) (ZIP)
Demonstrates techniques which can be used to export QuickTime movies in a separate export process.
QuickTime 2005-07-22
QTCoreImage101 (HTML) (DMG) (ZIP)
Demonstrates how to render a QuickTime Movie using Core Image filters and the new video pipeline.
Graphics & Imaging, QuickTime 2005-07-19
EnhancedAudioBurn (HTML) (DMG) (ZIP)
This Objective-C sample demonstrates how to burn RedBook Audio CDs.
File Management 2005-07-06
Quartz Composer QCTV (HTML) (DMG) (ZIP)
Shows how to build a fake TV system using Quartz Composer as the foundation motion graphics.
Graphics & Imaging 2005-07-06
QTAudioExtractionPanel (HTML) (DMG) (ZIP)
Enhances the QTKitPlayer to add an Audio Channel Mapping and Extraction panel
QuickTime 2005-06-27
CocoaSOAP (HTML) (DMG) (ZIP)
Demonstrates implementing a SOAP client and server in Cocoa.
Networking 2005-06-06
Reducer (HTML) (DMG) (ZIP)
Simple utility for rescaling bitmapped images. Demonstrates use of Core Image, NSAnimation, view drawing redirection.
Graphics & Imaging, User Experience 2005-06-06
UnsharpMask (HTML) (DMG) (ZIP)
Demonstrates how to build Automator actions using Cocoa frameworks.
Apple Applications, Graphics & Imaging 2005-06-06
AutoUpdater (HTML) (DMG) (ZIP)
This sample demonstrates Cocoa networking using the NSURL loading classes, NSURLConnection and NSURLDownload.
Networking 2005-06-01
BindingsJoystick (HTML) (DMG) (ZIP)
Illustrates a bindings-enabled subclass of NSView.
Data Management, Design Guidelines, Events & Other Input 2005-06-01
CocoaEcho (HTML) (DMG) (ZIP)
Cocoa example code showing how to write a simple client and server using NSStream.
Networking 2005-06-01
CocoaHTTPServer (HTML) (DMG) (ZIP)
A Cocoa example showing how to write a very basic HTTP service.
Networking 2005-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
GridCalendar (HTML) (DMG) (ZIP)
Demonstrates how to add a custom job submission UI to the GridSample project.
Networking 2005-06-01
ImageClient (HTML) (DMG) (ZIP)
Demonstrates how to use CFNetwork for synchronous and asynchronous operations, network diagnostics, proxy navigation, and authentication.
Networking 2005-06-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
iSpend (HTML) (DMG) (ZIP)
Demonstrates how to incorporate a number of Cocoa Tiger features into a simple application.
Data Management, User Experience 2005-06-01
Link Snoop (HTML) (DMG) (ZIP)
Shows how to use PDFKit to scan for and highlight link annotations in PDFs.
Graphics & Imaging 2005-06-01
ManagedObjectDataFormatter (HTML) (DMG) (ZIP)
A Data Formatter for Xcode 2.0 and 2.1 that displays NSManagedObject * variables.
Data Management 2005-06-01
OpenALExample (HTML) (DMG) (ZIP)
Basic example showing OpenAL usage in a 2D OpenGL environment
Games 2005-06-01
People (HTML) (DMG) (ZIP)
This program demonstrates the use of the SyncServices framework.
Data Management, Syncing 2005-06-01
Quartz Composer Live DV (HTML) (DMG) (ZIP)
Shows how to export a Quartz Composer composition as a real-time DV stream on the FireWire port.
Graphics & Imaging 2005-06-01
Quartz Composer Matrix (HTML) (DMG) (ZIP)
Shows how to use Quartz Composer to display a QuickTime movie as a series of frames in a 3D world.
Graphics & Imaging 2005-06-01
Quartz Composer Offline Rendering (HTML) (DMG) (ZIP)
Shows how to render a Quartz Composer composition as a series of images using an OpenGL pBuffer.
Graphics & Imaging 2005-06-01
Quartz Composer Texture (HTML) (DMG) (ZIP)
Shows how to use a Quartz Composer composition as an OpenGL texture.
Graphics & Imaging 2005-06-01
Quartz Composer WWDC 2005 Composition (HTML) (DMG) (ZIP)
Shows how to build a parameterized motion graphics composition with Quartz Composer.
Graphics & Imaging 2005-06-01
Quartz Composer WWDC 2005 TextEdit (HTML) (DMG) (ZIP)
Demonstrate how to modify TextEdit's about dialog to display a Quartz Composer composition.
Graphics & Imaging 2005-06-01
QuartzLines (HTML) (DMG) (ZIP)
Drawing Lines using Quartz's CGPath & CGContextStrokeLineSegments functions.
Graphics & Imaging 2005-06-01
TexturePerformanceDemo (HTML) (DMG) (ZIP)
OpenGL texture optimization demo for WWDC Session 214
Graphics & Imaging 2005-06-01
VertexPerformanceDemo (HTML) (DMG) (ZIP)
Vertex optimization demo for WWDC Session 214
Games, Graphics & Imaging 2005-06-01
Worm (HTML) (DMG) (ZIP)
NSView performance demonstration. Uses a periodic timer to get best performance with Coalesced Update feature.
Graphics & Imaging, Performance 2005-06-01
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
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
DataBurn (HTML) (DMG) (ZIP)
Demonstrates how to create a DRFolder and burn it to disc.
File Management 2005-03-17
PictureSharing (HTML) (DMG) (ZIP)
Demonstrates how to use NSNetServices to advertise a service using Bonjour.
Networking 2005-02-08
PictureSharingBrowser (HTML) (DMG) (ZIP)
Demonstrates how to use NSNetServices to take advantage of Bonjour service discovery and name resolution.
Networking 2005-02-08
NSGLImage (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to texture in OpenGL with an NSImage and/or NSBitmapImageRep
Games, Graphics & Imaging 2004-12-01
SpellingChecker CarbonCocoa Bundled (HTML) (DMG) (ZIP)
How to load and call a Cocoa bundle from a Carbon CFM or Mach-O application
Runtime Architecture 2004-08-17
FSCopyObject (HTML) (DMG) (ZIP)
Copy engine for copying files and directories.
File Management 2004-03-19
Video Hardware Info (HTML) (DMG) (ZIP)
Sample demonstrates how to query the video hardware for useful information.
Graphics & Imaging 2004-02-12
NSOpenGL Fullscreen (HTML) (DMG) (ZIP)
Demonstrates how to create and switch between windowed and fullscreen OpenGL contexts using NSOpenGL.
Graphics & Imaging 2004-02-11
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
ColorMatching (HTML) (DMG) (ZIP)
Performs simple color matching of images using ColorSync or the QuickTime 6.4 Graphics Importers.
Graphics & Imaging 2003-12-18
TipWrapper (HTML) (DMG) (ZIP)
Shows how to wrap long tool tips into multiple lines in Cocoa.
Text & Fonts, User Experience 2003-12-18
CocoaPeoplePicker (HTML) (DMG) (ZIP)
Demonstrates how to use the AddressBook framework's ABPeoplePickerView.
Apple Applications 2003-12-11
OpenGL Screensaver (HTML) (DMG) (ZIP)
Demonstrates how to integrate OpenGL drawing into a standard Cocoa screen saver on Mac OS X.
Graphics & Imaging, User Experience 2003-12-10
MapLargeFile (HTML) (DMG) (ZIP)
Shows a technique for mapping files greater than 4GB into memory for faster access.
Resource Management 2003-11-19
MungSaver (HTML) (DMG) (ZIP)
Demonstrates a simple Screen Saver module for Panther, using the Sequence Grabber DataProc mung technique.
User Experience 2003-11-18
RGB ValueTransformers (HTML) (DMG) (ZIP)
Supersedes the "RGB Image sample". Sample now uses bindings. Color separation now done in an NSValueTransformer subclass.
Graphics & Imaging 2003-11-18
ContentBurn (HTML) (DMG) (ZIP)
Creates an audio CD using standard audio files like mp3, aac, aiff, and wav.
File Management 2003-10-27