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

Sort by
Title
Sorted by
Topic
Sort by
Date
Sheets (HTML) (DMG) (ZIP)
Demonstrates how to create a sheet both in code and through the use of a Nib file.
Carbon 2003-10-24
SICN LDEF (HTML) (DMG) (ZIP)
Implements an LDEF that displays small icons to the left of text in a list.
Carbon 2003-01-30
SignatureToApp (HTML) (DMG) (ZIP)
Deprecated - Takes a signature (creator code) and finds the corresponding application, running or on disk.
Carbon 2003-01-14
SillyFrequencyLevels (HTML) (DMG) (ZIP)
Demonstrates how to obtain audio frequency levels from a Movie using SetMovieAudioFrequencyMeteringNumBands and GetMovieAudioFrequencyLevels APIs.
Carbon 2006-01-25
Simple DrawSprocket (HTML) (DMG) (ZIP)
Deprecated - Simple use of DrawSprocket to set screen resolution and size.
Carbon 2003-07-22
SimpleHIMovieViewPlayer (HTML) (DMG) (ZIP)
Demonstrates how to use HIMovieView to play QuickTime Movies.
Carbon 2005-07-15
SimpleList (HTML) (DMG) (ZIP)
A simple illustration of a ListBox Control implementation and its pitfall
Carbon 2003-01-30
SimplePlayThru (HTML) (DMG) (ZIP)
Use the HAL's Audio Output Unit (AUHAL) for device input and output on a single device (play-thru)
Carbon 2006-10-25
SimpleSpeechRecExample (HTML) (DMG) (ZIP)
Demonstrates how to use the Speech Recognition Manager in a simple application.
Carbon 2003-03-26
SimpleTabControl (HTML) (DMG) (ZIP)
Demonstrates how to use a simple tabbed pane window. This control is often used in preferences.
Carbon 2003-02-20
SimpleVideoOut (HTML) (DMG) (ZIP)
Demonstrates how QuickTime Video Output Components can be used to play video out to hardware.
Carbon 2005-08-10
Son of Grab (HTML) (DMG) (ZIP)
Shows how to use the new CGWindow to get window images from the Window Server.
Carbon 2007-11-01
SpellingChecker CarbonCocoa Bundled (HTML) (DMG) (ZIP)
How to load and call a Cocoa bundle from a Carbon CFM or Mach-O application
Carbon 2004-08-17
SpellingChecker-CarbonCocoa (HTML) (DMG) (ZIP)
Implements procedural C wrapper around the Cocoa NSSpellChecker, exports it as a Mach-O bundle called "SpellCheck.bundle"
Carbon 2003-01-14
SpellingChecker-CocoaCarbon (HTML) (DMG) (ZIP)
Demonstrates how to call NSSpellChecker cocoa routines from a Carbon application.
Carbon 2005-08-10
Splasher (HTML) (DMG) (ZIP)
Closes a modal window, such as a splash screen, with a mouse click or key press.
Carbon 2003-01-30
SplitView (HTML) (DMG) (ZIP)
An HIView sample that uses the HIFramework and implements a scalable split view.
Carbon 2003-01-30
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.
Carbon 2008-06-06
SSLSample (HTML) (DMG) (ZIP)
Contains examples showing how to use SecureTransport.
Carbon 2003-01-14
StarMenu (HTML) (DMG) (ZIP)
Shows how to create a Custom Star Shape menu using the new HIMenuView class.
Carbon 2007-05-24
stdFilterHacking (HTML) (DMG) (ZIP)
Demonstrates problems and workarounds for/with the Standard Dialog Filter.
Carbon 2003-01-30
StickiesExample (HTML) (DMG) (ZIP)
Contains sample code and tools used by Sync Services Tutorial to demonstrate debugging syncing applications.
Carbon 2006-08-08
StyleFlatteningSample (HTML) (DMG) (ZIP)
Shows how to use the ATSUFlatten and ATSUUnflatten APIs.
Carbon 2003-01-14
TabsShowcase (HTML) (DMG) (ZIP)
Shows how to instantiate and use the Tab control both programmatically and from a nib file.
Carbon 2005-10-28
TE Over Background (HTML) (DMG) (ZIP)
Deprecated - A textEdit that shows old text editing over a colored background
Carbon 2003-07-22
TextNameTool (HTML) (DMG) (ZIP)
A command line tool sample illustrating how to use various graphical facilities and services without a login.
Carbon 2003-10-27
TickerView (HTML) (DMG) (ZIP)
HIView subclass which implements a scrolling, live stock ticker.
Carbon 2003-01-30
Tiler (HTML) (DMG) (ZIP)
Modify your applications tile icon within the Mac OS X dock by using both QuickDraw and Quartz
Carbon 2003-10-24
TimeZone.Daylight (HTML) (DMG) (ZIP)
Deprecated - Shows how to read the current location and time zone that is set in Date & Time.
Carbon 2003-01-14
TremoloUnit (HTML) (DMG) (ZIP)
Audio unit sample demonstrating how to build an effect unit with a generic view.
Carbon 2006-10-26
TubeTest (HTML) (DMG) (ZIP)
Deprecated - The program is a simple demonstration of how to use the Palette Manager in a color program.
Carbon 2003-03-12
TypeServicesForUnicode (HTML) (DMG) (ZIP)
Shows how to use various ATSUI functions and features going from simple to very complex.
Carbon 2005-08-10
URLTextView (HTML) (DMG) (ZIP)
An HIView subclass which uses LaunchServices to open the URL attached to the view.
Carbon 2003-01-30
VelEng FFT (HTML) (DMG) (ZIP)
G4 Velocity Engine implementation of Fast Fourier Transform (FFT) and associated convolution/correlation routines.
Carbon 2003-01-14
Vertest (HTML) (DMG) (ZIP)
Demonstrates how to access the information from the Vers Resource. Developed for Tech Note #189.
Carbon 2003-01-30
VolumeToBSDNode (HTML) (DMG) (ZIP)
Shows how to iterate across all mounted volumes and retrieve their BSD node names.
Carbon 2006-10-16
Watcher (HTML) (DMG) (ZIP)
Uses FSEvents to monitor a directory hierarchy to keep track of its total size
Carbon 2006-08-04
WhackedTV (HTML) (DMG) (ZIP)
A Cocoa version of the venerable HackTV sample code, demonstrating usage of the Sequence Grabber API's
Carbon 2008-05-09
WindowFun (HTML) (DMG) (ZIP)
Create window layers and groups. Drawing transparent lines. How to display the "Poof" the toolbar uses.
Carbon 2005-08-24
YASTControl (HTML) (DMG) (ZIP)
An application illustrating how to use a user pane control to define MLTE based text fields.
Carbon 2003-10-27
ABPresence (HTML) (DMG) (ZIP)
Displays a list of all the people in your Address Book and their iChat status.
Cocoa 2006-08-04
AbstractTree (HTML) (DMG) (ZIP)
Using NSTreeController with NSOutlineView, Bindings, and Core Data.
Cocoa 2008-03-17
AddressBookCocoa (HTML) (DMG) (ZIP)
Demonstrates some basic manipulations of the Mac OS X 10.2.x (and beyond) Address Book API.
Cocoa 2003-01-14
AESendThreadSafe (HTML) (DMG) (ZIP)
Demonstrates how to send Apple events from threads other than the main thread.
Cocoa 2007-03-09
AlbumToSlideshow (HTML) (DMG) (ZIP)
Demonstrates using CF and NSXML to create Final Cut Pro XML.
Cocoa 2008-05-15
AnimatedSlider (HTML) (DMG) (ZIP)
Demonstrates the use of an NSTimer to animate a control in Cocoa.
Cocoa 2003-01-14
AttachAScript (HTML) (DMG) (ZIP)
Illustrates how you can extend any Cocoa application by adding some AppleScripts to it.
Cocoa 2006-07-27
AudioBurn (HTML) (DMG) (ZIP)
Demonstrates how to create an object conforming to the DRTrackProduction protocol to create a RedBook audio CD.
Cocoa 2005-03-17
AudioDeviceNotify (HTML) (DMG) (ZIP)
Demonstrates how to enumerate audio devices attached to the system and how to handle device notifications
Cocoa 2006-04-21
AutoSample (HTML) (DMG) (ZIP)
How to run and display Automator workflows in your application.
Cocoa 2007-05-23
AutoUpdater (HTML) (DMG) (ZIP)
This sample demonstrates Cocoa networking using the NSURL loading classes, NSURLConnection and NSURLDownload.
Cocoa 2005-06-01
BackgroundExporter (HTML) (DMG) (ZIP)
Demonstrates techniques which can be used to export QuickTime movies in a separate export process.
Cocoa 2005-07-22
BasicCocoaAnimations (HTML) (DMG) (ZIP)
"BasicCocoaAnimations" demonstrates the use of the animator proxy to easily animate Cocoa views and windows.
Cocoa 2007-06-11
BindingsJoystick (HTML) (DMG) (ZIP)
Illustrates a bindings-enabled subclass of NSView.
Cocoa 2005-06-01
BoingX (HTML) (DMG) (ZIP)
Shows off using Quartz Extreme to provide borderless OpenGL content on the desktop.
Cocoa 2007-11-06
Bound Button (HTML) (DMG) (ZIP)
Illustrates using Cocoa bindings to bind a button's target and action parameters.
Cocoa 2007-06-08
BundleLoader (HTML) (DMG) (ZIP)
Demonstrates how to load multiple Cocoa bundles or NSBundles (also known as plug-ins) into the main NSApplication.
Cocoa 2007-09-21
ButtonMadness (HTML) (DMG) (ZIP)
Demonstrates how to use the various types of buttons using a nib file or programatically.
Cocoa 2007-10-30
CALayerEssentials (HTML) (DMG) (ZIP)
Demonstrates the basics of setting up various Core Animation layers
Cocoa 2008-09-30
CallJS (HTML) (DMG) (ZIP)
Illustrates how to call JavaScripts on a web page in a WebView from Objective-C and vice versa
Cocoa 2007-03-09
CallMachOFramework (HTML) (DMG) (ZIP)
Shows two ways of calling a Mach-O framework from a CFM application on Mac OS X.
Cocoa 2003-07-17
CarbonCocoa_PictureCursor (HTML) (DMG) (ZIP)
Demonstrates how to use NSCursor from a Carbon based application.
Cocoa 2007-01-12
CarbonCocoaCoreImageTab (HTML) (DMG) (ZIP)
Carbon-based application creates a Cocoa-based web window which used CoreImage filters to transition between tabbed WebViews
Cocoa 2006-07-25
CarbonCocoaTempConverter (HTML) (DMG) (ZIP)
Demonstrates how to integrate Carbon and Cocoa user interfaces in the same Cocoa application.
Cocoa 2008-03-10
CarbonInCocoa (HTML) (DMG) (ZIP)
How to use Carbon GUI code in a Cocoa application.
Cocoa 2003-03-26
CarbonQuartzComposer_TV (HTML) (DMG) (ZIP)
Demonstrates how to integrate Cocoa based QuartzComposer window into a Carbon based application
Cocoa 2006-10-02
CFM_MachO_CFM (HTML) (DMG) (ZIP)
CFM application calls Mach-O routine, passing in a fixed up CFM function pointer as a callback parameter.
Cocoa 2003-07-17
CGDrawPicture (HTML) (DMG) (ZIP)
Deprecated - Shows how to use the QDPictDrawToCGContext API.
Cocoa 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.
Cocoa 2006-02-07
CIAnnotation (HTML) (DMG) (ZIP)
Image annotation application using Core Image Filters. Demonstrates creation and usage of Image Units.
Cocoa 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
Cocoa 2008-04-24
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
Cocoa - SGDataProc (HTML) (DMG) (ZIP)
Uses a Sequence Grabber data function and an NSQuickDrawView to simulate a preview operation for captured video.
Cocoa 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 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 2003-07-17
Cocoa OpenGL (HTML) (DMG) (ZIP)
Demonstrates using Cocoa with OpenGL, including window setup and event handling.
Cocoa 2007-10-22
Cocoa_With_Carbon_or_CPP (HTML) (DMG) (ZIP)
Shows how to call Carbon routines and C++ code from within an Objective-C Cocoa program.
Cocoa 2007-02-05
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
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 2005-06-01
CocoaInCarbon (HTML) (DMG) (ZIP)
Demonstrates using Cocoa GUI code in a Carbon application.
Cocoa 2005-10-04
CocoaPeoplePicker (HTML) (DMG) (ZIP)
Demonstrates how to use the AddressBook framework's ABPeoplePickerView.
Cocoa 2003-12-11
CocoaSlides (HTML) (DMG) (ZIP)
An image browser written using AppKit's Core Animation-based compositing and animation functionality
Cocoa 2007-11-02
CocoaSOAP (HTML) (DMG) (ZIP)
Demonstrates implementing a SOAP client and server in Cocoa.
Cocoa 2005-06-06
CocoaVideoFrameToGWorld (HTML) (DMG) (ZIP)
Demonstrates how to draw each frame of a QuickTime movie into a Cocoa NSQuickDrawView.
Cocoa 2003-01-14
CocoaVideoFrameToNSImage (HTML) (DMG) (ZIP)
Demonstrates how to create an NSImage for each frame of a QuickTime movie.
Cocoa 2003-01-14
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.
Cocoa 2003-01-14
ColorMatching (HTML) (DMG) (ZIP)
Performs simple color matching of images using ColorSync or the QuickTime 6.4 Graphics Importers.
Cocoa 2003-12-18
ColorSyncDevices-Cocoa (HTML) (DMG) (ZIP)
Demonstrates how to use the new ColorSync Device Manager routines in the Cocoa environment.
Cocoa 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
Core Animation QuickTime Layer (HTML) (DMG) (ZIP)
Shows the use of controls in a Layer over a Core Animation QTMovieLayer
Cocoa 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
CoreRecipes (HTML) (DMG) (ZIP)
Demonstrates the use of Core Data (persistency and object-graph management) with a variety of application projects.
Cocoa 2005-06-01
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.
Cocoa 2007-05-31
CryptoSample (HTML) (DMG) (ZIP)
Contains sample code showing symmetric encryption and message digest calculation.
Cocoa 2003-02-06
CTMClip (HTML) (DMG) (ZIP)
Deprecated - Shows how to manipulate the Quartz 2D Current Transform Matrix (CTM) for image drawing with clipping.
Cocoa 2003-01-14
CTMDemo (HTML) (DMG) (ZIP)
Deprecated - Shows how to manipulate the Quartz 2D Current Transform Matrix (CTM) for image drawing without clipping.
Cocoa 2003-01-14
CubePuzzle (HTML) (DMG) (ZIP)
Models a Rubik's Cube using Cocoa and OpenGL
Cocoa 2003-04-21