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
MoreAppleEvents (HTML) (DMG) (ZIP)
Provides routines that assist with the creation and sending of Apple events and object descriptors.
Carbon, Scripting & Automation, Tools 2003-01-14
MoreFiles (HTML) (DMG) (ZIP)
Shows various File Manager operations (file copy, etc.) through a collection of high-level routines.
Carbon, Cocoa 2003-01-14
MoreFilesX (HTML) (DMG) (ZIP)
Deprecated - Shows various File Manager operations through a collection of high-level routines using HFS Plus APIs.
Carbon, Cocoa 2005-05-13
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Audio, Carbon, Core Foundation, Darwin, Enterprise IT, Graphics & Imaging, Internationalization, Internet & Web, Networking, Porting, Scripting & Automation, Security, Text & Fonts, User Experience 2003-10-27
MoreOSL (HTML) (DMG) (ZIP)
C library for implementing AppleScript support within your application.
Carbon, Scripting & Automation 2003-01-14
MoreSCF (HTML) (DMG) (ZIP)
High-level wrapper around System Configuration framework, making common operations easy.
Darwin, Networking 2007-06-07
Moriarity (HTML) (DMG) (ZIP)
Implementing a Cocoa GUI that wraps command-line functionality, calling a UNIX task and presenting the results in a GUI.
Cocoa, Darwin 2003-01-14
Mountains (HTML) (DMG) (ZIP)
Demonstrates localization and internationalization techniques and APIs
Cocoa 2008-06-02
MouseTracking (HTML) (DMG) (ZIP)
Sample code used in the WWDC 2005 Hands-On session 215 "Moving from QD to Quartz"
Carbon, Graphics & Imaging 2005-06-01
Movie From DataRef (HTML) (DMG) (ZIP)
Demonstrates Asynchronous Movie loading and the NewMovieFromDataRef API. Part of "An Introduction to QuickTime".
QuickTime 2003-01-14
Movie Overlay (HTML) (DMG) (ZIP)
Shows how to overlay text & graphics and perform animation on an QTMovieView through a floating overlay window.
Cocoa, QuickTime 2008-07-25
MovieAssembler (HTML) (DMG) (ZIP)
Demonstrates AppleEvent communication with FCP, project modification using XML, and media file identification using metadata.
Apple Applications 2007-11-14
MovieBrowser (HTML) (DMG) (ZIP)
BrowserMaker creates a document with links to other movies in a folder.
QuickTime 2003-01-14
MovieCallbacks (HTML) (DMG) (ZIP)
Shows how to display a QuickTime movie within a window and add Call-backs.
Java, QuickTime 2006-05-11
MovieGWorlds (HTML) (DMG) (ZIP)
Demonstrates movie drawing-complete functions, movie compositing and using SetTrackGWorld to draw into a specific graphics world.
QuickTime 2003-12-18
MoviePlayer (HTML) (DMG) (ZIP)
A simple movie player application written in Microsoft Visual Basic 6 using the QuickTime 7 COM/ActiveX Control.
QuickTime 2005-10-13
MoviePlayer - C# (HTML) (DMG) (ZIP)
Microsoft Visual C# application which uses the QuickTime 7 COM Control to display and manipulate movies
QuickTime 2005-11-09
MovieSprites (HTML) (DMG) (ZIP)
Testing for mouse clicks on a sprite. Part of "An Introduction to QuickTime."
QuickTime 2003-01-14
MovieTextFinder (HTML) (DMG) (ZIP)
Shows how to search for text within the text track of a QuickTime movie.
Java, QuickTime 2006-05-11
MovieToAIFF (HTML) (DMG) (ZIP)
Using Movie Export Component to export QuickTime movie files into AIFF files.
QuickTime 2003-01-14
MovieVideoChart (HTML) (DMG) (ZIP)
Demonstrates direct access to video samples in movie files, using B-frame-aware APIs in QuickTime 7.
QuickTime 2006-07-11
Moving To GCC 4.0 (HTML) (DMG) (ZIP)
Shows how to fix code that GCC 3.3 accepts but GCC 4.0 doesn't.
Tools 2005-06-01
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.
Cocoa, Open Source 2003-01-14
MPDelayUntilTest (HTML) (DMG) (ZIP)
Tests and demonstrates the MT/MP MPDelayUntil API.
Performance 2003-10-27
MPFileCopy (HTML) (DMG) (ZIP)
Demonstrates how to copy a folder and its contents using the HFS Plus APIs from an MP task.
Carbon, Performance 2003-01-14
MPPeriodicalTest (HTML) (DMG) (ZIP)
Tests and demonstrates the MT/MP timers.
Performance 2003-10-27
MRJToolkitStubs (HTML) (DMG) (ZIP)
Deprecated - Stubs of the MRJToolkit API for building or distributing on non-Mac OS X systems.
Java 2003-01-14
MultiprecisionFP (HTML) (DMG) (ZIP)
How to utilize the gmp and arprec multiprecision floating point packages on Mac OS X
Mac OS X Server, Open Source, Performance 2007-03-26
MungSaver (HTML) (DMG) (ZIP)
Demonstrates a simple Screen Saver module for Panther, using the Sequence Grabber DataProc mung technique.
Carbon, Cocoa, QuickTime, User Experience 2003-11-18
Music (HTML) (DMG) (ZIP)
Shows how to use QuickTime's music components.
Java, QuickTime 2006-05-11
MyComponent (HTML) (DMG) (ZIP)
Sample component shell, useful for writing a new component.
QuickTime 2003-01-14
MyCustomColorPicker (HTML) (DMG) (ZIP)
Shows how to write a custom color picker using Cocoa.
Cocoa, Graphics & Imaging, User Experience 2006-10-09
MyFirstJNIProject (HTML) (DMG) (ZIP)
A Java application that calls the Address Book framework through the JNI
Java, Tools, User Experience 2006-04-12
MyMovieFilter (HTML) (DMG) (ZIP)
How to play a movie into a layer-backed QTMovieView and apply a Core Image filter while the movie plays.
Cocoa, Graphics & Imaging, QuickTime 2008-06-02
MyPhoto (HTML) (DMG) (ZIP)
Demonstrates preferred techniques for working with the Image Capture APIs
Graphics & Imaging 2005-06-01
MyRecorder (HTML) (DMG) (ZIP)
Demonstrates the use of the QTKit Capture APIs
QuickTime 2008-01-29
MyRegisterComponent (HTML) (DMG) (ZIP)
This component registers another component and makes it the default component.
QuickTime 2003-01-14
NameAndAddress (HTML) (DMG) (ZIP)
A single window utility that gets a host name from an IP address or an IP address from a hostname.
Cocoa, Internet & Web, Networking 2003-01-14
NameAndPassword (HTML) (DMG) (ZIP)
NameAndPassword is a SFAuthorizationPluginView subclass example.
Security 2006-07-28
NamingTableAccess (HTML) (DMG) (ZIP)
Digs out the contents of the NamingTable in a TrueType 'sfnt'.
Carbon, Cocoa, Core Foundation, Graphics & Imaging, Text & Fonts 2003-01-14
NetworkAuthentication (HTML) (DMG) (ZIP)
Demonstrates authentication with Open Directory APIs and GSSAPI
Darwin, Enterprise IT, Security 2005-06-01
NewCCursor (HTML) (DMG) (ZIP)
Deprecated - Shows how to create a black and white 'CURS' and a color 'crsr' cursor resource by hand.
Carbon, Graphics & Imaging, User Experience 2003-01-14
NewsReader (HTML) (DMG) (ZIP)
Demonstrates use of the Publication Subscription framework to create a simple RSS reader application.
Cocoa, Internet & Web, Networking 2007-06-01
NoCopyReceives (HTML) (DMG) (ZIP)
Demonstrates using no-copy receives under Open Transport.
Carbon, Games, Hardware & Drivers, Internet & Web, Mac OS X Server, Networking 2003-01-14
NoSound (HTML) (DMG) (ZIP)
Illustrates how to install a procedure to be executed when the user restarts or shuts down.
Carbon 2003-01-30
NotifyTool (HTML) (DMG) (ZIP)
Shows how to use the BSD notify API.
Darwin 2007-09-25
NSFontAttributeExplorer (HTML) (DMG) (ZIP)
Demonstrates how to gather and display various metric information for installed fonts using NSFont.
Cocoa, Text & Fonts, User Experience 2006-10-26
NSGLImage (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to texture in OpenGL with an NSImage and/or NSBitmapImageRep
Cocoa, Games, Graphics & Imaging 2004-12-01
NSLMiniBrowser (HTML) (DMG) (ZIP)
Deprecated - Uses the NSL API to find network services using SLP, NBP, and Directory Services.
Carbon, Networking 2003-01-14
NSOpenGL Fullscreen (HTML) (DMG) (ZIP)
Demonstrates how to create and switch between windowed and fullscreen OpenGL contexts using NSOpenGL.
Cocoa, Graphics & Imaging 2004-02-11
NSOperationSample (HTML) (DMG) (ZIP)
Demonstrates how to use the NSOperation and NSOperationQueue classes.
Cocoa 2007-06-11
NullAuthPlugin (HTML) (DMG) (ZIP)
Use this as a template for writing an authorization plugin, or as a tool to debug the authorization process.
Security 2007-10-26
NumberInput_IMKit_Sample (HTML) (DMG) (ZIP)
Illustrates an input method that uses the Mac OS X 10.5 InputMethodKit framework.
Cocoa, Internationalization 2008-03-17
NURBSSurfaceVertexProg (HTML) (DMG) (ZIP)
Uses a vertex program to compute the vertex position for a NURB surface.
Graphics & Imaging 2003-07-07
ObjectPath (HTML) (DMG) (ZIP)
Demonstrates how to use the NSPathControl class.
Cocoa, User Experience 2007-05-22
ODOC (HTML) (DMG) (ZIP)
Illustrates how to send an open document ('odoc') Apple event to another application process.
Carbon, Scripting & Automation, Tools 2003-01-14
offscreen.win (HTML) (DMG) (ZIP)
Uses NewGWorldFromHBITMAP to wrap a gworld around an existing DIB, then draws movie frames into this gworld.
QuickTime 2003-01-14
OldDelegateOnlyComponent (HTML) (DMG) (ZIP)
Deprecated - Please see DelegateOnlyComponent for the current version of this sample.
QuickTime 2003-10-27
OpenALExample (HTML) (DMG) (ZIP)
Basic example showing OpenAL usage in a 2D OpenGL environment
Audio, Cocoa, 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
Cocoa, Games, Graphics & Imaging, Performance 2008-02-06
OpenGL Screensaver (HTML) (DMG) (ZIP)
Demonstrates how to integrate OpenGL drawing into a standard Cocoa screen saver on Mac OS X.
Cocoa, Graphics & Imaging 2003-12-10
OpenGLCaptureToMovie (HTML) (DMG) (ZIP)
How to capture the screen on Mac OS X using OpenGL and save to a QuickTime movie.
Graphics & Imaging, QuickTime 2007-08-30
OpenGLCompositorLab (HTML) (DMG) (ZIP)
Demonstrates using OpenGL to composite multiple sources in hardware. Requires NVIDIA GeForce 4 Ti hardware.
Cocoa, Graphics & Imaging, QuickTime 2003-04-21
OpenGLScreenSnapshot (HTML) (DMG) (ZIP)
Demonstrates how to get the screen pixels using OpenGL and save them to an image file.
Graphics & Imaging 2008-08-14
OSXAdapter (HTML) (DMG) (ZIP)
Hooks into the Mac OS X Application Menu with the com.apple.eawt classes via reflection.
Java 2007-06-01
OT Virtual Server (HTML) (DMG) (ZIP)
Deprecated - Sample code which uses Open Transport and demonstrates real world issues.
Carbon, Networking 2003-01-14
OTEndpointInfo (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to query an endpoint for its 'vital statistic' using OTGetEndpointInfo.
Carbon, Networking 2003-08-20
OTLookupNameTest (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to lookup NBP entities on an AppleTalk network using Open Transport.
Carbon, Networking 2003-01-14
OTMP (HTML) (DMG) (ZIP)
Deprecated - A library for calling Open Transport synchronously from preemptively scheduled tasks (MP tasks).
Carbon, Networking 2003-07-22
OTPingSample (HTML) (DMG) (ZIP)
Deprecated - Demonstrates how to implement ping on top of the Open Transport API.
Carbon, Networking 2003-07-22
Out of This GWorld (HTML) (DMG) (ZIP)
Deprecated - Demonstrates the use of offscreen GWorlds and palette animation to simulate animation.
Carbon, Games, Graphics & Imaging, User Experience 2003-03-12
OutputBins2PDE (HTML) (DMG) (ZIP)
A Printer PDE demonstrating new features in 10.5
Printing 2008-02-08
Palette and GWorld (HTML) (DMG) (ZIP)
Deprecated - Demonstrates the use of palette and color tables with GWorlds.
Carbon, Graphics & Imaging 2003-10-10
Password (HTML) (DMG) (ZIP)
Deprecated - Illustrates three different ways to implement password fields in dialogs.
Carbon 2003-01-30
PasteboardPeeker (HTML) (DMG) (ZIP)
Using pasteboards for Copy and Paste, Drag and Drop, service support and filter services.
Carbon, Cocoa, Core Foundation, Text & Fonts, User Experience 2005-08-10
PBORenderToVertexArray (HTML) (DMG) (ZIP)
This sample demonstrates render-to-vertex-array using FBO, PBO, and VBO.
Graphics & Imaging 2006-10-02
PDEProject (HTML) (DMG) (ZIP)
Deprecated - Demonstrates an application-hosted printing dialog extension (PDE) that displays a custom pane in the Print dialog.
Carbon, Graphics & Imaging, Printing 2003-01-14
PDF Annotation Editor (HTML) (DMG) (ZIP)
Demonstrates how to use PDF Kit to examine, edit, and create PDF annotations.
Cocoa, Graphics & Imaging 2006-07-31
PDF Calendar (HTML) (DMG) (ZIP)
Demonstrates how to use PDF Kit to create PDF content.
Cocoa, Graphics & Imaging 2006-07-31
PDFKitLinker2 (HTML) (DMG) (ZIP)
Demonstrates many aspects of PDFKit including navigation, display modes, searching, and PDFView subclassing.
Cocoa, Graphics & Imaging 2005-08-10
PDFView (HTML) (DMG) (ZIP)
Shows how to display or print a multi-page PDF document and scroll an NSscrollview's contents by dragging.
Cocoa 2003-01-23
People (HTML) (DMG) (ZIP)
This program demonstrates the use of the SyncServices framework.
Cocoa 2005-06-01
PhotoSearch (HTML) (DMG) (ZIP)
Demonstrates advanced controls and cells. Custom drawing, hit testing, tracking, editing, expansion tooltips, tracking areas.
Cocoa 2008-03-05
PhotoToss: CSS Transforms, Transitions, and Web Fonts (HTML) (DMG) (ZIP)
Demonstrates how to use CSS Transforms, Transitions, and Web Fonts.
Apple Applications, Internet & Web 2008-08-21
PictureSharing (HTML) (DMG) (ZIP)
Demonstrates how to use NSNetServices to advertise a service using Bonjour.
Cocoa, Networking 2005-02-08
PictureSharingBrowser (HTML) (DMG) (ZIP)
Demonstrates how to use NSNetServices to take advantage of Bonjour service discovery and name resolution.
Cocoa, Networking 2005-02-08
PictureTaker (HTML) (DMG) (ZIP)
Demonstrates the PictureTaker in a basic Cocoa application
Cocoa, Graphics & Imaging 2007-04-02
PIDFromBSDProcessName (HTML) (DMG) (ZIP)
Provides a simple API to do process PID lookup based on BSD process name.
Darwin, Open Source, Tools 2003-02-13
PinBallHighScores (HTML) (DMG) (ZIP)
Demonstrates use of Quartz Composer for displaying data within an application
Graphics & Imaging 2007-06-11
Play Movie with Controller (HTML) (DMG) (ZIP)
Playing a QuickTime movie using a movie controller. Part of "An Introduction to QuickTime".
QuickTime 2003-01-14
Play Video Sample (HTML) (DMG) (ZIP)
Deprecated - The sample makes use of the RequestVideo sample code API.
Carbon, Graphics & Imaging 2003-01-14
PlayMovie (HTML) (DMG) (ZIP)
Demonstrates QuickTime content playback within a java.awt.Frame using the QTFactory to create a QTComponent.
Java, QuickTime 2006-05-11
PlayMovieJava (HTML) (DMG) (ZIP)
Deprecated - Display any QuickTime content within an AWT container using the QTCanvas.
QuickTime 2003-01-14
PlaySound (HTML) (DMG) (ZIP)
Shows how to play a sound or midi file using AWT rather than a QTComponent.
Java, QuickTime 2006-05-11
PlayTune (HTML) (DMG) (ZIP)
Shows how to use the TunePlayer to play a Tune using the QuickTime Music Architecture.
Java, QuickTime 2006-05-11
PMPrinterPrintWithFile (HTML) (DMG) (ZIP)
How to send files, for example PostScript and PDF, directly to the printer. Replaces the pict-ps path.
Carbon, Graphics & Imaging, Printing 2006-07-18
PMPrinterTest (HTML) (DMG) (ZIP)
Demonstrates using the PMPrinter APIs to obtain information about the connected printers.
Carbon, Cocoa, Printing 2009-02-13
Polygons (HTML) (DMG) (ZIP)
Demonstrates the NSBezierPath class, as well as the manipulation of NSView's coordinate space for convenience.
Cocoa 2003-01-14
PopUpMenuWithCurFont (HTML) (DMG) (ZIP)
Deprecated - Demonstrates what must be done to control the font used by MDEF 0 during PopUpMenuSelect.
Carbon 2003-01-30
PortMapper (HTML) (DMG) (ZIP)
Demonstrates Bonjour's NAT port-mapping API, and provides a higher-level Objective-C interface to it.
Cocoa, Internet & Web, Networking 2008-07-25