Jump To:
Each Sample Code project is buildable and executable source example of how to accomplish a task for a specific Apple technology. They show the correct sequence of calls and parameter data types to provide a generalized method for API use that developers can modify for their specific needs.

Document Descriptions
On Off
Display

Sorted by
Title
Sort by
Topic
Sort by
Date
CFPrefsDumper (HTML) (DMG) (ZIP)
Shows how to use the CFPreferences APIs to access information about the current user preferences.
Carbon, Core Foundation 2003-01-14
CFPrefTopScores (HTML) (DMG) (ZIP)
How to access globally shared (writable) user preferences without requiring authentication.
Carbon, Core Foundation, Games, Porting 2006-10-09
CFProxySupportTool (HTML) (DMG) (ZIP)
Shows how to use the CFProxySupport APIs to decide whether a network connection should pass through a proxy.
Core Foundation, Darwin, Networking 2007-10-29
CGDrawPicture (HTML) (DMG) (ZIP)
Deprecated - Shows how to use the QDPictDrawToCGContext API.
Cocoa, Graphics & Imaging 2003-01-14
CGGamma (HTML) (DMG) (ZIP)
Shows how to use CGDirectDisplay calls to manipulate display gamma tables.
Games, Graphics & Imaging 2003-01-14
CheckExecutableArchitecture (HTML) (DMG) (ZIP)
Determine whether a particular Mach-O executable contains a version suitable for executing on a given processor architecture.
Carbon, Cocoa, Core Foundation, Darwin 2006-02-07
ChromaKeyMovie (HTML) (DMG) (ZIP)
Demonstrates alternative approaches to removing a color from a QuickTime movie.
QuickTime 2003-01-14
CIAnnotation (HTML) (DMG) (ZIP)
Image annotation application using Core Image Filters. Demonstrates creation and usage of Image Units.
Cocoa, Graphics & Imaging 2005-08-01
CIColorTracking (HTML) (DMG) (ZIP)
An Objective-C applicaton that implements a GPU-based technique to find the location of a uniquely colored object in a scene
Carbon, Cocoa, Games, Graphics & Imaging 2008-04-24
CITransitionSelectorSample2 (HTML) (DMG) (ZIP)
Showing all available Core Image transitions in a scrollable NSOpenGLView
Graphics & Imaging 2006-09-18
CIVideoDemoGL (HTML) (DMG) (ZIP)
CIVideoDemoGL demonstrates using Core Image with QuickTime and Core Video
Graphics & Imaging, QuickTime 2007-10-03
Clock Control (HTML) (DMG) (ZIP)
Demonstrates creating a custom control by creating a clock control, implemented as a subclass of NSControl and NSCell.
Cocoa 2003-02-25
ClockView (HTML) (DMG) (ZIP)
An HIView sample that uses the HIFramework to implement a scalable analog clock.
Carbon 2003-01-30
ClosedCaptionImporter (HTML) (DMG) (ZIP)
QuickTime Movie Import Component for Scenarist Closed Caption files.
QuickTime 2007-11-15
Cocoa - SGDataProc (HTML) (DMG) (ZIP)
Uses a Sequence Grabber data function and an NSQuickDrawView to simulate a preview operation for captured video.
Cocoa, QuickTime 2003-01-14
Cocoa CG aliasing demo (HTML) (DMG) (ZIP)
Shows how to draw both aliased and anti-aliased text and graphics using Quartz and Cocoa.
Cocoa, Graphics & Imaging 2003-07-17
Cocoa CG arc demo (HTML) (DMG) (ZIP)
Shows how to draw both aliased and anti-aliased arcs using Quartz and Cocoa.
Cocoa, Graphics & Imaging 2003-07-17
Cocoa OpenGL (HTML) (DMG) (ZIP)
Demonstrates using Cocoa with OpenGL, including window setup and event handling.
Cocoa, Games, Graphics & Imaging, Hardware & Drivers, Performance 2007-10-22
Cocoa PDE with Carbon Printing (HTML) (DMG) (ZIP)
Application that uses a Cocoa PDE along with the Carbon Printing APIs.
Carbon, Graphics & Imaging, Printing, User Experience 2007-07-27
Cocoa_With_Carbon_or_CPP (HTML) (DMG) (ZIP)
Shows how to call Carbon routines and C++ code from within an Objective-C Cocoa program.
Carbon, Cocoa 2007-02-05
CocoaCreateMovie (HTML) (DMG) (ZIP)
Demonstrates how to create a QuickTime movie from a set of Cocoa JPEG NSImage objects.
QuickTime 2003-01-14
CocoaDragAndDrop (HTML) (DMG) (ZIP)
Implement Drag-and-Drop functionality in Cocoa (uses images; can be extended to support other data types).
Cocoa 2003-01-14
CocoaDVDPlayer (HTML) (DMG) (ZIP)
Demonstrates how to use DVD Playback Services to play DVD-Video media.
Graphics & Imaging 2005-11-04
CocoaEcho (HTML) (DMG) (ZIP)
Cocoa example code showing how to write a simple client and server using NSStream.
Cocoa 2005-06-01
CocoaHTTPServer (HTML) (DMG) (ZIP)
A Cocoa example showing how to write a very basic HTTP service.
Cocoa, Networking 2005-06-01
CocoaInCarbon (HTML) (DMG) (ZIP)
Demonstrates using Cocoa GUI code in a Carbon application.
Carbon, Cocoa 2005-10-04
CocoaPeoplePicker (HTML) (DMG) (ZIP)
Demonstrates how to use the AddressBook framework's ABPeoplePickerView.
Apple Applications, Cocoa 2003-12-11
CocoaSlides (HTML) (DMG) (ZIP)
An image browser written using AppKit's Core Animation-based compositing and animation functionality
Cocoa, Graphics & Imaging 2007-11-02
CocoaSOAP (HTML) (DMG) (ZIP)
Demonstrates implementing a SOAP client and server in Cocoa.
Cocoa 2005-06-06
CocoaSpeechSynthesisExample (HTML) (DMG) (ZIP)
Shows how to use the Carbon Speech Synthesis API from within a Mac OS X Cocoa application.
Games, User Experience 2007-03-23
CocoaVideoFrameToGWorld (HTML) (DMG) (ZIP)
Demonstrates how to draw each frame of a QuickTime movie into a Cocoa NSQuickDrawView.
Cocoa, QuickTime 2003-01-14
CocoaVideoFrameToNSImage (HTML) (DMG) (ZIP)
Demonstrates how to create an NSImage for each frame of a QuickTime movie.
Cocoa, QuickTime 2003-01-14
CollectPictColors (HTML) (DMG) (ZIP)
Deprecated - Uses Picture Utilities package and KnowsPict application to demonstrate collecting colors used by Pict resources.
Graphics & Imaging, User Experience 2003-10-10
Color Sampler (HTML) (DMG) (ZIP)
Demonstrates one way to sample the color at a given point in an NSView.
Cocoa 2003-01-14
ColorBars (HTML) (DMG) (ZIP)
Shows how to enumerate, select, capture, manipulate, draw to, and release displays using the CGDirectDisplay API.
Carbon, Cocoa, Graphics & Imaging 2003-01-14
ColoredCheckBox (HTML) (DMG) (ZIP)
Demonstrates how to create a colored check box on a gray window backgrounds.
Carbon 2003-01-30
ColorMatching (HTML) (DMG) (ZIP)
Performs simple color matching of images using ColorSync or the QuickTime 6.4 Graphics Importers.
Cocoa, Graphics & Imaging, QuickTime 2003-12-18
ColorSwatchView (HTML) (DMG) (ZIP)
Implements a color well control as an HIView using HIFramework C++ Carbon Event wrapper classes.
Carbon 2003-01-30
ColorSyncDevices (HTML) (DMG) (ZIP)
Demonstrates how to use the new ColorSync Device Support APIs introduced with Mac OS X.
Carbon, Graphics & Imaging 2003-01-14
ColorSyncDevices-Cocoa (HTML) (DMG) (ZIP)
Demonstrates how to use the new ColorSync Device Manager routines in the Cocoa environment.
Carbon, Cocoa 2003-01-14
ComboBoxPrefs (HTML) (DMG) (ZIP)
Use CFPrefs to store URLs to images for use in a browser style combo box.
Carbon 2005-10-04
CompressMovies (HTML) (DMG) (ZIP)
Shows how to use QuickTime movie compression in an application.
QuickTime 2003-01-14
ContentBurn (HTML) (DMG) (ZIP)
Creates an audio CD using standard audio files like mp3, aac, aiff, and wav.
Cocoa 2003-10-27
ControlBackground (HTML) (DMG) (ZIP)
Shows how to affect the background color of a control when drawing it.
Carbon 2003-01-30
ConvertMovieSndTrack (HTML) (DMG) (ZIP)
Demonstrates using the Sound Converter to transcode a Sound Track from one audio encoding format to another.
QuickTime 2003-01-14
ConvertToMovieJr (HTML) (DMG) (ZIP)
Shows how to recompress QuickTime movies using the Image Compression Manager routines.
QuickTime 2003-01-14
CopyBits vs. CopyMask (HTML) (DMG) (ZIP)
Deprecated - CopyBits (using a mask region) vs. CopyMask (using a mask BitMap). Which do you think is faster?
Carbon, Performance 2003-07-22
Core Animation QuickTime Layer (HTML) (DMG) (ZIP)
Shows the use of controls in a Layer over a Core Animation QTMovieLayer
Cocoa, Graphics & Imaging, QuickTime 2007-09-26
Core Data HTML Store (HTML) (DMG) (ZIP)
Implementation of a Core Data atomic store based on HTML tables
Cocoa 2007-06-01
CoreImageGLTextureFBO (HTML) (DMG) (ZIP)
Making OpenGL textures with Core Image
Graphics & Imaging 2008-07-30
CoreRecipes (HTML) (DMG) (ZIP)
Demonstrates the use of Core Data (persistency and object-graph management) with a variety of application projects.
Cocoa, User Experience 2005-06-01
CoreTextArc (HTML) (DMG) (ZIP)
Illustrates the use of fonts, lines, and runs in a CoreText text drawing Carbon application.
Carbon, Core Foundation, Text & Fonts, User Experience 2007-06-04
CoreTextTest (HTML) (DMG) (ZIP)
Shows how to handle the CoreText objects to display text.
Carbon, Core Foundation, Text & Fonts 2006-12-19
CPUGestalt (HTML) (DMG) (ZIP)
Deprecated - Shows how to determine the processor type of the Macintosh you're running on.
Carbon, Hardware & Drivers 2003-10-27
CreateMovie (HTML) (DMG) (ZIP)
Demonstrates how to create a QuickTime Movie with both a video and audio track.
QuickTime 2003-01-14
CreateMovie - C# (HTML) (DMG) (ZIP)
Visual C# application demonstrating the QuickTime 7 COM Control creating movies from images and saving them
QuickTime 2005-11-09
CreateMovie - VB6 (HTML) (DMG) (ZIP)
Using the QuickTime 7 COM Control to create a movie from images and save the movie to disk
QuickTime 2005-11-09
CreateMovieFromReferences (HTML) (DMG) (ZIP)
Shows how to create a movie from existing video samples in a file using AddMediaSampleReferences.
QuickTime 2007-08-31
CreateMovieJava (HTML) (DMG) (ZIP)
Deprecated - Creates a Movie from Java drawing and a sound file.
QuickTime 2003-01-14
CreatePictFile (HTML) (DMG) (ZIP)
Creates a QTComponent from a PICT, JPEG or GIF file using a GraphicsImporter.
Java, QuickTime 2006-05-11
Cropped Image (HTML) (DMG) (ZIP)
Demonstrates how to extract a sub-image from another image, and some ways of indicating a selection.
Cocoa 2003-01-14
CrossEvents (HTML) (DMG) (ZIP)
Demonstrates how to send CarbonEvents and NSNotifications between Carbon and Cocoa.
Carbon, Cocoa 2007-05-31
CryptNoMore (HTML) (DMG) (ZIP)
Shows how to authenticate a user using Open Directory (Directory Services).
Darwin, Networking, Security 2008-03-17
CryptoSample (HTML) (DMG) (ZIP)
Contains sample code showing symmetric encryption and message digest calculation.
Carbon, Cocoa, Darwin, Security 2003-02-06
CTMClip (HTML) (DMG) (ZIP)
Deprecated - Shows how to manipulate the Quartz 2D Current Transform Matrix (CTM) for image drawing with clipping.
Carbon, Cocoa, Graphics & Imaging 2003-01-14
CTMDemo (HTML) (DMG) (ZIP)
Deprecated - Shows how to manipulate the Quartz 2D Current Transform Matrix (CTM) for image drawing without clipping.
Carbon, Cocoa, Graphics & Imaging 2003-01-14
CubePuzzle (HTML) (DMG) (ZIP)
Models a Rubik's Cube using Cocoa and OpenGL
Cocoa, Games, Graphics & Imaging 2003-04-21
Custom_HIView_Tutorial (HTML) (DMG) (ZIP)
Tutorial presenting a step-by-step custom HIView development. All steps are documented and provided as standalone projects.
Carbon 2005-06-01
CustomAtomicStoreSubclass (HTML) (DMG) (ZIP)
Illustrates the implementation of a custom Core Data atomic store.
Cocoa 2007-06-08
CustomMedia (HTML) (DMG) (ZIP)
Demonstrates how to subclass quicktime.std.movies.media.Media to support custom media types.
Java, QuickTime 2006-05-11
CustomMediaIcons (HTML) (DMG) (ZIP)
Providing custom media icons for storage
Hardware & Drivers 2007-07-10
CustomSave (HTML) (DMG) (ZIP)
Demonstrates how to customize the NSSavePanel.
Cocoa, User Experience 2007-06-11
CustomWindow (HTML) (DMG) (ZIP)
Demonstrates how to create a custom window in Mac OS X.
Carbon 2003-01-30
CustomWindowWidget (HTML) (DMG) (ZIP)
Demonstrates two ways of adding a custom window widget to the window frame of a standard document window.
Carbon 2003-01-30
CWCocoaComponent (HTML) (DMG) (ZIP)
Native color picker Integration for AWT/Swing applications using NSColorWell and NSColorPanel
Java 2006-04-12
CxxNewDelete (HTML) (DMG) (ZIP)
How to override the C++ 'new' and 'delete' operators.
Tools 2006-10-03
DataBurn (HTML) (DMG) (ZIP)
Demonstrates how to create a DRFolder and burn it to disc.
Cocoa 2005-03-17
databurntest (HTML) (DMG) (ZIP)
Demonstrates how to create a DRFolderRef and burn it to disc.
Carbon 2003-01-14
DatePicker (HTML) (DMG) (ZIP)
Demonstrates how to use the NSDatePicker control.
Cocoa, User Experience 2007-04-25
DecompressionAndScaling (HTML) (DMG) (ZIP)
Shows how to convert a version 2 PICT to a compressed QuickTime data buffer.
QuickTime 2003-01-14
DelegateOnlyComponent (HTML) (DMG) (ZIP)
Image Codec Component which simply delegates to a real Image Codec (in this case a '2vuy' decompressor).
QuickTime 2005-10-18
Departments and Employees (HTML) (DMG) (ZIP)
Source code for NSPersistentDocument Core Data Tutorial.
Cocoa 2007-05-31
DerivedProperty (HTML) (DMG) (ZIP)
Illustrates use of Core Data derived properties to make searching against string data more efficient.
Cocoa 2008-06-04
DeskPictAppDockMenu (HTML) (DMG) (ZIP)
How to add a dynamic Dock menu to your Cocoa application
Cocoa, Scripting & Automation 2003-01-14
DesktopSprites (HTML) (DMG) (ZIP)
Shows how to use the QuickTime Sprite Toolbox APIs to create and animate sprites in a window.
QuickTime 2003-02-25
DesktopSprites.win (HTML) (DMG) (ZIP)
Shows how to use the QuickTime Sprite Toolbox APIs to create and animate sprites in a window.
QuickTime 2003-02-25
DeviceListener (HTML) (DMG) (ZIP)
Uses the DiscRecording framework to listen for device plug/unplug events and media insertion events.
Cocoa 2003-07-17
DialogsToHIViews (HTML) (DMG) (ZIP)
Shows how to convert from an old-style resource-based dialog to a modern nib-based window with HIViews.
Carbon 2005-08-24
Dicey (HTML) (DMG) (ZIP)
Dicey is a dice game project that demonstrates various techniques for making a Cocoa application accessible.
Cocoa 2006-08-01
DictionaryController (HTML) (DMG) (ZIP)
"DictionaryController" is a Cocoa application that demonstrates various ways in how to use the NSDictionaryController class.
Cocoa, User Experience 2007-12-20
DigitizerShell (HTML) (DMG) (ZIP)
Simple sequence grabber and vdig test bed for testing vdig and digitizer functionality.
QuickTime 2003-01-14
Dimmer2Effect (HTML) (DMG) (ZIP)
Shows how to build a custom 2 source effect component for QuickTime.
QuickTime 2003-02-25
Dimmer2Effect.win (HTML) (DMG) (ZIP)
Shows how to build a custom 2 source effect component for QuickTime.
QuickTime 2003-02-25
DisplayURL (HTML) (DMG) (ZIP)
Parses a passed in path URL into its various components displaying server information.
Carbon, Core Foundation 2005-10-04
dist_fft (HTML) (DMG) (ZIP)
Gigaelement FFTs on Apple G5 clusters
Audio, Darwin, Hardware & Drivers, Performance 2004-08-23
DNSServiceMetaQuery (HTML) (DMG) (ZIP)
Shows how to discover Bonjour service types being advertised on the local network.
Core Foundation, Darwin, Networking 2005-06-01
DockBrowser (HTML) (DMG) (ZIP)
Demonstrates how to use CFNetServices to take advantage of Bonjour service discovery and name resolution.
Carbon, Networking 2005-02-08
DockTile (HTML) (DMG) (ZIP)
Demonstrates how to customize your application's icon in the Dock by using the NSDockTile class.
Cocoa, User Experience 2007-09-11
DragAndDrop Shell (HTML) (DMG) (ZIP)
A Drag and Drop shell for producing QuickTime drag and drop tools.
Carbon, QuickTime 2003-01-14
DragItemAround (HTML) (DMG) (ZIP)
Illustrates creating a custom subclass of NSView.
Cocoa 2006-03-16