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
SayIt (HTML) (DMG) (ZIP)
Web Kit plug-in which speaks text passed via JavaScript
Apple Applications, Cocoa, Internet & Web, User Experience 2006-08-04
SBSendEmail (HTML) (DMG) (ZIP)
Using the Scripting Bridge to tell Mail.app to send an email message with an optional attachment.
Cocoa, Internet & Web, Scripting & Automation 2008-02-28
SBSetFinderComment (HTML) (DMG) (ZIP)
Set/Get Finder Comments using Scripting Bridge
Cocoa, Scripting & Automation 2007-12-04
SBSystemPrefs (HTML) (DMG) (ZIP)
Shows how to use Scripting Bridge to display a preference pane in System Preferences.
Cocoa, Scripting & Automation 2008-10-13
SCAudioCompress (HTML) (DMG) (ZIP)
Demonstrates audio compression using QuickTime Standard Audio Compression Component
QuickTime 2006-08-22
Scrap Parsing (HTML) (DMG) (ZIP)
Deprecated - Shows how to parse the in-memory scrap.
Carbon 2003-01-30
ScriptBuildPhases (HTML) (DMG) (ZIP)
Augmenting Project Builder build phases with scripts to do extra work or invoke other tools.
Porting, Tools 2003-01-14
ScriptingBridgeFinder (HTML) (DMG) (ZIP)
Using the Finder with Scripting Bridge
Scripting & Automation 2007-12-13
ScriptingBridgeiCal (HTML) (DMG) (ZIP)
Adding/updating events in iCal using Scripting Bridge.
Cocoa, Scripting & Automation 2007-12-13
ScriptingDefinitions (HTML) (DMG) (ZIP)
Provides a starting sdef (scripting definition) and a completed one for the Sketch example code.
Scripting & Automation 2008-05-30
ScriptView (HTML) (DMG) (ZIP)
Shows how to build a script editor application with a built-in script database using AppleScript Studio.
Scripting & Automation, Tools 2005-06-01
ScrollAndZoom (HTML) (DMG) (ZIP)
An illustration of the use of the Context Transformation Matrix (CTM) for zooming and scrolling a HIView.
Carbon 2005-08-10
SCSIHBAEmulator (HTML) (DMG) (ZIP)
Demonstration of how to implement a virtual parallel tasking SCSI host bus adapter (HBA)
Darwin, Hardware & Drivers, Mac OS X Server 2007-02-20
SCSIOldAndNew (HTML) (DMG) (ZIP)
Demonstrates a backward-compatible technique for communicating with SCSI parallel devices on Mac OS X.
Hardware & Drivers 2006-12-07
SDKExample (HTML) (DMG) (ZIP)
Shows how to weak-link against the Carbon framework in various SDKs to adopt new OS features in a single executable.
Carbon, Porting, Tools, User Experience 2005-06-06
SearchField (HTML) (DMG) (ZIP)
Demonstrates how to use and customize the features of the "NSSearchField" control.
Cocoa, User Experience 2007-04-25
SeeMyFriends (HTML) (DMG) (ZIP)
Illustrates how to use SyncServices API in a Carbon (HLTB) based application
Apple Applications, Carbon 2006-10-16
Sequence Grabbing (HTML) (DMG) (ZIP)
Demonstrates how to use a sequence grabber component to preview and record captured data.
QuickTime 2003-01-14
SerialPortSample (HTML) (DMG) (ZIP)
Demonstrates how to do serial I/O on Mac OS X.
Hardware & Drivers 2005-08-16
SetCustomIcon (HTML) (DMG) (ZIP)
Demonstrates how to programmatically set a custom icon for a file, folder, or disk.
Carbon, Graphics & Imaging, User Experience 2006-08-01
SetIndString (HTML) (DMG) (ZIP)
Implements SetIndString(), which sets a particular STR# string to the passed in string. Similar to GetIndString()
Carbon 2003-01-30
SetMouseAcclSample (HTML) (DMG) (ZIP)
Find HID System Manager and get/set cursor acceleration
Carbon, Cocoa, Games, Hardware & Drivers, User Experience 2006-11-28
SetWindBackColor (HTML) (DMG) (ZIP)
Demonstrates how to programmatically set the background color of a window without flicker without the Appearance Manager.
Carbon 2003-01-30
SGCapture (HTML) (DMG) (ZIP)
Deprecated - Displays live video within a QTCanvas using the SGDrawable class.
QuickTime 2003-01-14
SGCapture2Disk (HTML) (DMG) (ZIP)
Deprecated - Use the SequenceGrabber to display video within a QTCanvas and capture the video to a movie file.
QuickTime 2003-01-14
SGDataProcSample (HTML) (DMG) (ZIP)
Demonstrates how to run the Sequence Grabber in record mode using an SGDataProc to captured data.
QuickTime 2003-01-14
SGDevices (HTML) (DMG) (ZIP)
Demonstrates how to use the SGGetChannelDeviceList function to build and parse the list of devices.
QuickTime 2003-01-14
SharedMemory (HTML) (DMG) (ZIP)
Shows how multiple applications can access the same memory using the Unix shmget system call.
Cocoa, Performance 2003-01-14
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
Show Movie (HTML) (DMG) (ZIP)
Demonstrates several QuickTime features for manipulating movies and their playback.
QuickTime 2003-01-14
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.
Audio, Carbon, Cocoa, QuickTime 2006-01-25
SIMD Primer (HTML) (DMG) (ZIP)
Introduction to using SIMD/SSE
Performance 2008-06-06
Simon (HTML) (DMG) (ZIP)
A simple game demonstrating Cocoa development in Project Builder.
Cocoa 2003-01-14
Simple Bindings Adoption (HTML) (DMG) (ZIP)
A simple example that illustrates the adoption of Cocoa Bindings.
Cocoa 2007-06-07
Simple DrawSprocket (HTML) (DMG) (ZIP)
Deprecated - Simple use of DrawSprocket to set screen resolution and size.
Carbon, Games 2003-07-22
SimpleAudioExtraction (HTML) (DMG) (ZIP)
Demonstrates the QuickTime 7.0 Movie Audio Extraction APIs
Audio, QuickTime 2006-01-03
simpleAVC (HTML) (DMG) (ZIP)
Shows how to discover and send commands to AVC devices connected by FireWire.
Hardware & Drivers 2003-01-14
SimpleCalendar (HTML) (DMG) (ZIP)
Uses the Calendar Store framework to fetch iCal events and display them on a custom calendar.
Apple Applications, Cocoa, Internet & Web 2006-07-27
SimpleCarbonAppleScript (HTML) (DMG) (ZIP)
A simple example illustrating how to add readable and writable AppleScript properties to Carbon Application.
Scripting & Automation 2007-03-01
SimpleCocoaApp (HTML) (DMG) (ZIP)
A basic Cocoa application for beginners to Cocoa and Objective-C.
Cocoa 2007-08-07
SimpleCocoaJavaMovie (HTML) (DMG) (ZIP)
Deprecated - A simple movie player showing how to use the NSMovieView and NSMovie Cocoa Java classes.
Cocoa, QuickTime 2003-01-14
SimpleCocoaJavaMovieCocoa (HTML) (DMG) (ZIP)
Deprecated - Shows how to use the NSMovieView and NSMovie Cocoa Java AppKit classes.
Cocoa, Java 2003-01-14
SimpleCocoaMovie (HTML) (DMG) (ZIP)
Shows how to use the NSMovieView and NSMovie Cocoa AppKit classes.
Cocoa, QuickTime 2003-01-14
SimpleCocoaMovieQT (HTML) (DMG) (ZIP)
A simple movie player showing how to use the NSMovieView and NSMovie Cocoa Objective-C classes.
Cocoa, QuickTime 2003-01-14
SimpleDataQueue (HTML) (DMG) (ZIP)
Implements an IODataQueue inside an I/O Kit KEXT which passes events and data to user space.
Darwin 2003-01-14
SimpleDial (HTML) (DMG) (ZIP)
Demonstrates management of dialup connections, such as PPP, using System Configuration framework network connection API.
Core Foundation, Darwin, Networking 2005-07-26
SimpleDownload (HTML) (DMG) (ZIP)
Shows how to use the Image Capture APIs to download a user-selected file to the user's ~/Pictures directory.
Apple Applications 2003-01-14
simpleeditsdi.win (HTML) (DMG) (ZIP)
Demonstrates how to display and edit QuickTime movies using the SDI (single document interface).
QuickTime 2003-01-14
SimpleHIMovieViewPlayer (HTML) (DMG) (ZIP)
Demonstrates how to use HIMovieView to play QuickTime Movies.
Carbon, QuickTime 2005-07-15
simpleJavaLauncher (HTML) (DMG) (ZIP)
How to launch 1.4.x and future JVM's from a Core Foundation tool.
Java, Porting, Tools 2006-04-12
SimpleList (HTML) (DMG) (ZIP)
A simple illustration of a ListBox Control implementation and its pitfall
Carbon 2003-01-30
SimplePing (HTML) (DMG) (ZIP)
Sample provides simple API to programatically ping a remote host without admin privileges
Darwin, Games, Internet & Web, Networking, Tools 2003-10-27
simpleplayersdi.win (HTML) (DMG) (ZIP)
Demonstrates how to display QuickTime movies using the SDI (single document interface).
QuickTime 2003-01-14
SimplePlayThru (HTML) (DMG) (ZIP)
Use the HAL's Audio Output Unit (AUHAL) for device input and output on a single device (play-thru)
Audio, Carbon, Games, Hardware & Drivers 2006-10-25
SimpleReach (HTML) (DMG) (ZIP)
Demonstrates network host reachability testing using the System Configuration framework asynchronous network reachability API.
Core Foundation, Darwin, Networking 2005-07-26
SimpleScripting (HTML) (DMG) (ZIP)
Illustrates the minimal steps required to make an application scriptable.
Scripting & Automation 2008-05-30
SimpleScriptingObjects (HTML) (DMG) (ZIP)
How to add scriptable objects to an AppleScriptable application.
Scripting & Automation 2008-06-02
SimpleScriptingProperties (HTML) (DMG) (ZIP)
How to add some properties to the terminology provided by an AppleScriptable application.
Scripting & Automation 2008-06-02
SimpleScriptingVerbs (HTML) (DMG) (ZIP)
How to add verbs to the terminology provided by an AppleScriptable application.
Scripting & Automation 2008-06-02
SimpleSpeechRecExample (HTML) (DMG) (ZIP)
Demonstrates how to use the Speech Recognition Manager in a simple application.
Audio, Carbon, Games, User Experience 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
SimpleThreads (HTML) (DMG) (ZIP)
Uses the Cocoa threading APIs to coordinate multiple preemptively scheduled secondary threads with the non-reentrant Cocoa framework.
Cocoa 2003-01-14
SimpleUserClient (HTML) (DMG) (ZIP)
Shows how to create a user client for an I/O Kit kernel driver.
Audio, Darwin, Hardware & Drivers, Mac OS X Server 2008-08-27
SimpleVideoOut (HTML) (DMG) (ZIP)
Demonstrates how QuickTime Video Output Components can be used to play video out to hardware.
Carbon, Hardware & Drivers, QuickTime 2005-08-10
Sketch-112 (HTML) (DMG) (ZIP)
Sketch is a Scriptable Graphics application. This sample adds certain Scriptable functionality to Sketch, as an example for use in WWDC 2005 Session 112.
Scripting & Automation 2005-06-06
SkyCreator (HTML) (DMG) (ZIP)
Demonstrates using the QuartzDebug utility with Java Applications by creating a random image of a starry sky.
Java 2006-04-12
SlideShowImporter (HTML) (DMG) (ZIP)
Movie import component, constructs a movie from images, effect types, and audio files.
QuickTime 2003-01-14
SlideShowImporter.win (HTML) (DMG) (ZIP)
Movie import component, constructs a movie from images, effect types, and audio files.
QuickTime 2003-01-14
SlideShowJava (HTML) (DMG) (ZIP)
Deprecated - Uses the ImageViewer object to present a sequence of images one at a time.
QuickTime 2003-01-14
SMARTQuery (HTML) (DMG) (ZIP)
Demonstration of how to access and use S.M.A.R.T. disk monitoring functionality
Hardware & Drivers, Mac OS X Server, Storage 2007-05-30
sndequalizer (HTML) (DMG) (ZIP)
Manage a dialog window containing a graphical equalizer display.
QuickTime 2003-01-14
SocketCancel (HTML) (DMG) (ZIP)
Shows how to safely cancel threads that are blocked within BSD sockets calls.
Darwin, Networking 2005-08-10
SoftVDigX (HTML) (DMG) (ZIP)
Demonstrates the "Compressed Source" model and an updated implementation of the Video Digitizer APIs for Mac OS X.
QuickTime 2007-02-14
SoftVideoOutputComponent (HTML) (DMG) (ZIP)
Software implementation of a QuickTime Video Output Component, includes a companion Transfer Codec.
QuickTime 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, Cocoa, Graphics & Imaging 2007-11-01
SonOfSillyBalls (HTML) (DMG) (ZIP)
Draws a bunch of randomly colored, randomly placed, silly balls in a window on the screen.
Cocoa 2003-01-14
Sound PreMixer effect (HTML) (DMG) (ZIP)
Deprecated - A sound manager pre-mixer effect component.
QuickTime 2003-03-14
soundconverter (HTML) (DMG) (ZIP)
Shows how to use the Sound Converter API and how to place audio data in a movie.
QuickTime 2003-01-14
soundconverter.win (HTML) (DMG) (ZIP)
Shows how to use the Sound Converter API and how to place audio data in a movie.
QuickTime 2003-01-14
SoundMemRecord (HTML) (DMG) (ZIP)
This code shows using the SoundManager SPB calls for simple audio recording to memory.
Java, QuickTime 2006-05-05
SoundPlayer (HTML) (DMG) (ZIP)
Shows how to play VBR and Non-VBR encoded audio using the SoundConverterFillBuffer API and QuickTime.
QuickTime 2003-01-14
SoundPlayer.win (HTML) (DMG) (ZIP)
Shows how to play VBR and Non-VBR encoded audio using the SoundConverterFillBuffer API and QuickTime.
QuickTime 2003-01-14
SoundRecord (HTML) (DMG) (ZIP)
Shows using the SequenceGrabber for simple audio recording
Java, QuickTime 2006-05-05
soundsnippets (HTML) (DMG) (ZIP)
SoundSnippets.c defines functions that perform some common sound-related operations.
QuickTime 2003-10-27
soundsnippets.win (HTML) (DMG) (ZIP)
SoundSnippets.c defines functions that perform some common sound-related operations.
QuickTime 2003-10-27
SourceView (HTML) (DMG) (ZIP)
Demonstrates how to use NSOutlineView driven by NSTreeController.
Cocoa, Internet & Web, User Experience 2007-11-15
SpecialPictureProtocol (HTML) (DMG) (ZIP)
Use a custom NSURLProtocol to create jpeg images in memory for display in a webView.
Cocoa, Internet & Web 2006-03-13
SpeedometerView (HTML) (DMG) (ZIP)
Shows how to make a custom NSView.
Cocoa, User Experience 2007-06-06
SpellingChecker CarbonCocoa Bundled (HTML) (DMG) (ZIP)
How to load and call a Cocoa bundle from a Carbon CFM or Mach-O application
Carbon, Cocoa 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, Cocoa 2003-01-14
SpellingChecker-CocoaCarbon (HTML) (DMG) (ZIP)
Demonstrates how to call NSSpellChecker cocoa routines from a Carbon application.
Carbon, Cocoa 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
Spotlight (HTML) (DMG) (ZIP)
Sample code that shows how to write Spotlight Importers.
Core Foundation, Storage 2005-06-01
SpotlightAPI (HTML) (DMG) (ZIP)
Some small sample programs that Show how to use the Spotlight API in your programs.
Storage 2005-06-01
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, Cocoa, User Experience 2008-06-06
Sproing (HTML) (DMG) (ZIP)
Shows how "springs" work to control view resizing behavior.
Cocoa, Tools 2003-05-20
Squiggles (HTML) (DMG) (ZIP)
Demonstrates many Cocoa fundamentals in a Document-based Application featuring custom drawing and event-handling.
Cocoa, Graphics & Imaging 2008-08-29