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
CryptNoMore (HTML) (DMG) (ZIP)
Shows how to authenticate a user using Open Directory (Directory Services).
Security 2008-03-17
CryptoSample (HTML) (DMG) (ZIP)
Contains sample code showing symmetric encryption and message digest calculation.
Security 2003-02-06
GetMACAddressSample (HTML) (DMG) (ZIP)
Demonstrates how to retrieve the MAC address for each Ethernet interface from the Mac OS X I/O Registry.
Security 2003-01-14
GetPrimaryMACAddress (HTML) (DMG) (ZIP)
Demonstrates retrieving the MAC address of the built-in Ethernet controller. Useful for uniquely identifying a Macintosh system.
Security 2005-10-27
IdentitySample (HTML) (DMG) (ZIP)
IdentitySample builds a utility which demonstrates how to use the CoreServices Identity API to manage system-wide identities
Security 2006-07-27
KauthORama (HTML) (DMG) (ZIP)
Prints each Kauth request, illustrating how Kauth interacts with high-level operations, like copying files.
Security 2007-04-30
Kerberos GSS (HTML) (DMG) (ZIP)
Kerberos GSS-API Sample
Security 2008-06-04
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Security 2003-10-27
NameAndPassword (HTML) (DMG) (ZIP)
NameAndPassword is a SFAuthorizationPluginView subclass example.
Security 2006-07-28
NetworkAuthentication (HTML) (DMG) (ZIP)
Demonstrates authentication with Open Directory APIs and GSSAPI
Security 2005-06-01
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
QISA (HTML) (DMG) (ZIP)
Demonstrates the basics of writing an Internet setup assistant for traditional Mac OS and Mac OS X.
Security 2003-05-15
SSLSample (HTML) (DMG) (ZIP)
Contains examples showing how to use SecureTransport.
Security 2003-01-14
ABPresence (HTML) (DMG) (ZIP)
Displays a list of all the people in your Address Book and their iChat status.
Storage 2006-08-04
SampleFilterScheme (HTML) (DMG) (ZIP)
Demonstrates a simple filter scheme which passes all operations through to its provider unchanged.
Storage 2006-01-03
SMARTQuery (HTML) (DMG) (ZIP)
Demonstration of how to access and use S.M.A.R.T. disk monitoring functionality
Storage 2007-05-30
Spotlight (HTML) (DMG) (ZIP)
Sample code that shows how to write Spotlight Importers.
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
VolumeToBSDNode (HTML) (DMG) (ZIP)
Shows how to iterate across all mounted volumes and retrieve their BSD node names.
Storage 2006-10-16
ATSUIDirectAccessDemo (HTML) (DMG) (ZIP)
Demonstrates some basic manipulations of the ATSUI DirectAccess api.
Text & Fonts 2003-01-14
BasicInputMethod (HTML) (DMG) (ZIP)
An input method implemented as a text service component for Mac OS X.
Text & Fonts 2003-01-14
CoreTextArc (HTML) (DMG) (ZIP)
Illustrates the use of fonts, lines, and runs in a CoreText text drawing Carbon application.
Text & Fonts 2007-06-04
CoreTextTest (HTML) (DMG) (ZIP)
Shows how to handle the CoreText objects to display text.
Text & Fonts 2006-12-19
HITextShowcase (HTML) (DMG) (ZIP)
Illustrates some of the different text-related controls, non-controls, and HIViews that are available in Mac OS X 10.3.
Text & Fonts 2003-10-27
HITextViewDemo (HTML) (DMG) (ZIP)
Overview of basic HITextView functionality, including Tiger's new font & spelling panel support.
Text & Fonts 2005-06-01
HITextViewShowcase (HTML) (DMG) (ZIP)
Shows how to create a HITextView using Interface Builder and using programming functions only.
Text & Fonts 2003-10-30
InkSample (HTML) (DMG) (ZIP)
Demonstrates some usage scenarios for the Ink.Framework APIs.
Text & Fonts 2003-10-27
MLTE_CustomScrolling (HTML) (DMG) (ZIP)
Shows how to implement MLTE's custom scrolling functionality
Text & Fonts 2004-10-15
MoreIsBetter (HTML) (DMG) (ZIP)
Library providing indispensable wrapers and workarounds for many areas of Mac OS programming.
Text & Fonts 2003-10-27
NamingTableAccess (HTML) (DMG) (ZIP)
Digs out the contents of the NamingTable in a TrueType 'sfnt'.
Text & Fonts 2003-01-14
NSFontAttributeExplorer (HTML) (DMG) (ZIP)
Demonstrates how to gather and display various metric information for installed fonts using NSFont.
Text & Fonts 2006-10-26
PasteboardPeeker (HTML) (DMG) (ZIP)
Using pasteboards for Copy and Paste, Drag and Drop, service support and filter services.
Text & Fonts 2005-08-10
TextLayoutDemo (HTML) (DMG) (ZIP)
Customizing NSTextView with NSLayoutManager and a custom NSTextContainer.
Text & Fonts 2007-06-01
TextNameTool (HTML) (DMG) (ZIP)
A command line tool sample illustrating how to use various graphical facilities and services without a login.
Text & Fonts 2003-10-27
TimeZone.Daylight (HTML) (DMG) (ZIP)
Deprecated - Shows how to read the current location and time zone that is set in Date & Time.
Text & Fonts 2003-01-14
TypeServicesForUnicode (HTML) (DMG) (ZIP)
Shows how to use various ATSUI functions and features going from simple to very complex.
Text & Fonts 2005-08-10
AppearanceSampleUpdated (HTML) (DMG) (ZIP)
Sample Code for the WWDC 402 Adopting Xcode Hands-on session.
Tools 2005-06-27
Birthdays (HTML) (DMG) (ZIP)
Dashboard widget with a plug-in that queries AddressBook.framework for contacts with upcoming birthdays.
Tools 2008-09-10
BlockAnimation (HTML) (DMG) (ZIP)
A bit of java code which INCORRECTLY handles animation
Tools 2006-08-01
ButtonMadness (HTML) (DMG) (ZIP)
Demonstrates how to use the various types of buttons using a nib file or programatically.
Tools 2007-10-30
CxxNewDelete (HTML) (DMG) (ZIP)
How to override the C++ 'new' and 'delete' operators.
Tools 2006-10-03
Fractal Performance (HTML) (DMG) (ZIP)
Three fractal applications that show various bottlenecks and how they can be fixed.
Tools 2006-04-17
IBFragmentView (HTML) (DMG) (ZIP)
Illustrates building an Interface Builder plugin including a custom inspector and library integration for a custom view.
Tools 2006-08-01
Installer Tiger Examples (HTML) (DMG) (ZIP)
A walkthrough of using distribution scripts and other Tiger Installer features.
Tools 2005-06-01
InstallerPluginSample (HTML) (DMG) (ZIP)
Provides instructions for extending software installation using custom plugins
Tools 2006-08-30
iSync Sample Document (HTML) (DMG) (ZIP)
iSync Plug-in Maker sample document, illustrating how to build an iSync plug-in for a SyncML phone.
Tools 2006-08-01
JDragNDrop (HTML) (DMG) (ZIP)
Deprecated - Demonstrates building a simple view to implement Drag-and-Drop functionality in Cocoa-Java.
Tools 2003-01-14
MachPortDump (HTML) (DMG) (ZIP)
Dumps out the Mach port name space of a process; useful when debugging port right leaks.
Tools 2005-08-10
ManagedObjectDataFormatter (HTML) (DMG) (ZIP)
A Data Formatter for Xcode 2.0 and 2.1 that displays NSManagedObject * variables.
Tools 2005-06-01
MoreAppleEvents (HTML) (DMG) (ZIP)
Provides routines that assist with the creation and sending of Apple events and object descriptors.
Tools 2003-01-14
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
MyFirstJNIProject (HTML) (DMG) (ZIP)
A Java application that calls the Address Book framework through the JNI
Tools 2006-04-12
ODOC (HTML) (DMG) (ZIP)
Illustrates how to send an open document ('odoc') Apple event to another application process.
Tools 2003-01-14
PIDFromBSDProcessName (HTML) (DMG) (ZIP)
Provides a simple API to do process PID lookup based on BSD process name.
Tools 2003-02-13
QCFundamentals (HTML) (DMG) (ZIP)
Demonstrates Coordinate, Interpolation, and Iterative systems in Quartz Composer with an amusing animation
Tools 2006-08-07
QCGalaxy (HTML) (DMG) (ZIP)
Demonstrates use of Particle Systems and Core Image Filters in Quartz Composer
Tools 2006-08-07
Quartz Composer WWDC 2005 Composition (HTML) (DMG) (ZIP)
Shows how to build a parameterized motion graphics composition with Quartz Composer.
Tools 2005-06-01
Reminders (HTML) (DMG) (ZIP)
Dashboard widget with a plug-in that displays upcoming iCal events, to do items, and calendars.
Tools 2008-07-25
ScriptBuildPhases (HTML) (DMG) (ZIP)
Augmenting Project Builder build phases with scripts to do extra work or invoke other tools.
Tools 2003-01-14
ScriptView (HTML) (DMG) (ZIP)
Shows how to build a script editor application with a built-in script database using AppleScript Studio.
Tools 2005-06-01
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.
Tools 2005-06-06
simpleJavaLauncher (HTML) (DMG) (ZIP)
How to launch 1.4.x and future JVM's from a Core Foundation tool.
Tools 2006-04-12
SimplePing (HTML) (DMG) (ZIP)
Sample provides simple API to programatically ping a remote host without admin privileges
Tools 2003-10-27
Sproing (HTML) (DMG) (ZIP)
Shows how "springs" work to control view resizing behavior.
Tools 2003-05-20
TemperatureTester (HTML) (DMG) (ZIP)
Shows how to add a simple Unit Test to Temperature Converter.
Tools 2005-06-06
Test64BitMultiprec (HTML) (DMG) (ZIP)
Implements (PPC) A*Y+B where A & B are arrays of 64-bit words and Y is a 64-bit integer
Tools 2006-06-09
UpdateXcodeSubprojects (HTML) (DMG) (ZIP)
Updates all subprojects of an Xcode project to Xcode 2.1 format. Illustrates scripting techniques.
Tools 2005-06-06
WcharDataFormatter (HTML) (DMG) (ZIP)
An example of how to write a custom data formatter.
Tools 2006-03-31
XcodeClientServer (HTML) (DMG) (ZIP)
Demonstrates how to manage multiple projects using new Xcode features.
Tools 2005-06-06
ABPresence (HTML) (DMG) (ZIP)
Displays a list of all the people in your Address Book and their iChat status.
User Experience 2006-08-04
AbstractTree (HTML) (DMG) (ZIP)
Using NSTreeController with NSOutlineView, Bindings, and Core Data.
User Experience 2008-03-17
AppleScriptRunner (HTML) (DMG) (ZIP)
How to send mail and execute other AppleScripts from a Carbon application.
User Experience 2006-07-31
BasicCocoaAnimations (HTML) (DMG) (ZIP)
"BasicCocoaAnimations" demonstrates the use of the animator proxy to easily animate Cocoa views and windows.
User Experience 2007-06-11
BasicInputMethod (HTML) (DMG) (ZIP)
An input method implemented as a text service component for Mac OS X.
User Experience 2003-01-14
BundleLoader (HTML) (DMG) (ZIP)
Demonstrates how to load multiple Cocoa bundles or NSBundles (also known as plug-ins) into the main NSApplication.
User Experience 2007-09-21
ButtonMadness (HTML) (DMG) (ZIP)
Demonstrates how to use the various types of buttons using a nib file or programatically.
User Experience 2007-10-30
Carbon Porting Tutorial (HTML) (DMG) (ZIP)
Porting a simple application from Mac OS 9 to Mac OS X
User Experience 2006-07-25
CarbonCocoa_PictureCursor (HTML) (DMG) (ZIP)
Demonstrates how to use NSCursor from a Carbon based application.
User Experience 2007-01-12
Cocoa PDE with Carbon Printing (HTML) (DMG) (ZIP)
Application that uses a Cocoa PDE along with the Carbon Printing APIs.
User Experience 2007-07-27
CocoaSpeechSynthesisExample (HTML) (DMG) (ZIP)
Shows how to use the Carbon Speech Synthesis API from within a Mac OS X Cocoa application.
User Experience 2007-03-23
CollectPictColors (HTML) (DMG) (ZIP)
Deprecated - Uses Picture Utilities package and KnowsPict application to demonstrate collecting colors used by Pict resources.
User Experience 2003-10-10
CoreRecipes (HTML) (DMG) (ZIP)
Demonstrates the use of Core Data (persistency and object-graph management) with a variety of application projects.
User Experience 2005-06-01
CoreTextArc (HTML) (DMG) (ZIP)
Illustrates the use of fonts, lines, and runs in a CoreText text drawing Carbon application.
User Experience 2007-06-04
CustomSave (HTML) (DMG) (ZIP)
Demonstrates how to customize the NSSavePanel.
User Experience 2007-06-11
DatePicker (HTML) (DMG) (ZIP)
Demonstrates how to use the NSDatePicker control.
User Experience 2007-04-25
DictionaryController (HTML) (DMG) (ZIP)
"DictionaryController" is a Cocoa application that demonstrates various ways in how to use the NSDictionaryController class.
User Experience 2007-12-20
DockTile (HTML) (DMG) (ZIP)
Demonstrates how to customize your application's icon in the Dock by using the NSDockTile class.
User Experience 2007-09-11
Grady (HTML) (DMG) (ZIP)
Demonstrates how to use the NSGradient class.
User Experience 2007-02-28
HelpHook (HTML) (DMG) (ZIP)
Simple Help Viewer integration for J2SE applications, using a native Cocoa library.
User Experience 2006-04-12
HID Calibrator (HTML) (DMG) (ZIP)
Human Interface Device Manager Calibrator sample
User Experience 2008-05-07
HID Config Save (HTML) (DMG) (ZIP)
Human Interface Device Manager Configuration sample
User Experience 2008-05-07
HID Explorer (HTML) (DMG) (ZIP)
Human Interface Device Manager Explorer
User Experience 2008-05-07
HID LED test tool (HTML) (DMG) (ZIP)
HID Manager sample project that shows how to set and clear keyboard LEDs.
User Experience 2008-07-25
HID Manager Basics (HTML) (DMG) (ZIP)
Shows basic use of HID Manager for Mac OS X: including device discovery, queues and polling elements.
User Experience 2003-07-10
HID Utilities Source (HTML) (DMG) (ZIP)
Shows a high level abstract library for the HID manager.
User Experience 2003-10-06
HITextViewDemo (HTML) (DMG) (ZIP)
Overview of basic HITextView functionality, including Tiger's new font & spelling panel support.
User Experience 2005-06-01
HIView-NSView (HTML) (DMG) (ZIP)
Demonstrates how to embed an NSView within an HIView in a Carbon window.
User Experience 2007-05-29
IconCollection (HTML) (DMG) (ZIP)
Demonstrates how to use NSCollectionView along with NSWorkspace and named images to determine its content.
User Experience 2008-01-18
Image Kit with Core Data (HTML) (DMG) (ZIP)
Using Image Kit's browser view with Core Data content.
User Experience 2008-07-25
ImageBackground (HTML) (DMG) (ZIP)
Shows how to draw an image in the background of an NSOutlineView and NSTableView.
User Experience 2006-10-02