Framework

PreferencePanes

Integrate your app's custom preferences into the System Preferences app.

Overview

Use the Preference Panes framework to integrate your custom system-level preferences into the System Preferences app. You use this framework to implement a preference pane bundle, which contains the custom interface you want to display to the user. You then install your bundle in the appropriate Library/PreferencePanes directory on the user's system.

System Preferences works with your bundle's custom NSPreferencePane object to manage the presentation of your custom interface to the user. System Preferences loads the view provided by your bundle and delivers lifecycle events to your preference pane object. Use that object to respond to interactions with the controls and views of your interface and to save any settings changes to the user's defaults database.

Topics

Preference Pane Interface

class NSPreferencePane

The interface for providing preference panes to System Preferences or other apps.

Notifications

static let NSPreferencePrefPaneIsAvailable: NSNotification.Name

Notifies observers that the system preferences app is available to display your preferences.

static let NSPreferencePaneDoUnselect: NSNotification.Name

Notifies observers that the preference pane may be deselected.

static let NSPreferencePaneCancelUnselect: NSNotification.Name

Notifies observers that the preference pane should not be deselected.

static let NSPreferencePaneSwitchToPane: NSNotification.Name

Notifies observers that the user selected a new preference pane.

static let NSPreferencePaneUpdateHelpMenu: NSNotification.Name

Notifies observers that your help menu content changed.

Help Menu Keys

let NSPrefPaneHelpMenuInfoPListKey: String

The global help menu items associated with a preference pane.

let NSPrefPaneHelpMenuTitleKey: String

The title of a help menu item in a preference pane.

let NSPrefPaneHelpMenuAnchorKey: String

The help book anchor to display.