Next Page > Hide TOC

Introduction to Preference Panes

Contents:

Who Should Read This Document?
Organization of This Document
Limitations


Preference panes are dynamically loaded plug-ins that provide a graphical user interface to the system’s or an application’s user preferences. Preference panes can be presented to the user using the central System Preferences application, using a specialized preferences application, or as the Preferences menu item in an application’s application menu. In System Preferences, each icon in its Show All view represents an individual preference pane plug-in. You can develop preference panes for use by System Preferences or by your own application.

The most common situation for using preference panes is an application that lacks its own user interface (or has a very restricted user interface such as the Mac OS X Login application) but needs to be configurable. Possible cases include a server application that always runs in the background or an application that makes its services available to other applications through the Services menu. To allow configuration of these applications, you must provide a user interface in a separate application. You should not require the user to hand-edit configuration files or execute the application from the command line with special arguments. Instead, create one or more preference pane plug-ins that contain the user interface and the code that can read and write the preference settings. Then, either supply your own “Setup” application or, if appropriate, use System Preferences to display the preference panes.

Who Should Read This Document?

You should read this document if you are a Cocoa developer who wants to provide a custom preference pane, accessible from the System Preferences applications, to your users. You should have a working knowledge of Cocoa programming with the Application Kit before attempting preference pane programming.

Organization of This Document

This document describes how to create and manage a preference pane, how to have System Preferences load your own preference pane, and how to load a preference pane in your own application.

Here are the concepts covered:

Here are the tasks covered:

Limitations

The Preference Panes framework is available only in Mac OS X version 10.1 and later. You cannot create new plug-ins for System Preferences nor use preference panes in your applications on earlier versions of Mac OS X. If you want your application to run on 10.0.x systems, you need to build your own implementation for preferences. You can still use all the techniques described in this documentation, though, regarding storage of preferences and communication between applications as covered in “Managing User Preferences,” “Using Preference Services,” and “Communicating With the Target Application.”

The Preference Panes framework can be used only by an Objective-C Cocoa application. The preference pane also needs to be written in Objective-C with its user interface implemented using Cocoa.



Next Page > Hide TOC


© 2003, 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-10-03)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.