Each distinct settings screen is represented by a property-list file. At a minimum, a Settings bundle must have at least one root screen, represented by the Root.plist
file. Additional screens may be added using child pane elements, but each distinct screen must have its own associated property list file. For each of those files, Table 1 lists the keys that can appear at the root level of each file.
Key | Type | Value |
---|---|---|
| Array | The value for this key is an array of dictionaries, with each dictionary containing the information for a single preference element. These keys must be listed in the order you want them to appear on the preferences page. |
| String | The name of the strings file associated with this schema file. A copy of this file (with appropriate localized strings) should be located in each of your bundle’s language-specific project directories. If you do not include this key, the strings in this schema file are not localized. For information on creating strings files, see Internationalization Programming Topics. |
The title string that appears at the top of each settings screen is derived from an external source. In the case of your application’s root settings screen, the title string is the application name itself. For child settings screens, the title is taken from the Title key of the child pane element used to display that screen. For more information about this key, see “Child Pane Element.”
Each dictionary in the PreferenceSpecifiers
key contains the keys associated with a preferences element. Table 2 lists the element types that are supported.
Element Type | Description |
---|---|
| A text field preference. This element displays an optional title and an editable text field. You can use this type for preferences that require the user to specify a custom string value. For more information, see “Text Field Element” . |
| A read-only string preference. You can use this type to display preference values as formatted strings. For more information, see “Title Element” . |
| A toggle switch preference. You can use this type to configure a preference that can have only one of two values. Although you typically use this type to represent preferences containing Boolean values, you can also use it with preferences containing non-Boolean values. For more information, see “Toggle Switch Element” . |
| A slider preference. You can use this type for a preference that represents a range of values. The value for this type is a real number whose minimum and maximum you specify. For more information, see “Slider Element.” |
| A multi-value preference. You can use this type for a preference that supports a set of mutually exclusive values. For more information, see “Multi Value Element” . |
| A group item preference. The group type is a way for you to organize groups of preferences on a single page. The group type does not represent a configurable preference. For more information, see “Group Element” . |
| A child pane preference. You can use this type to link to a new page of preferences. For more information, see “Child Pane Element.” |
Last updated: 2010-04-27