Mac Developer Library


System Configuration Framework Reference SCPreferencesPath Reference

Deployment Target:

On This Page

SCPreferencesPath Reference

The SCPreferencesPath programming interface allows an application to load and store XML configuration data in a controlled manner and provide the necessary notifications to other applications that need to be aware of configuration changes.

The functions in this programming interface view the data as a collection of dictionaries of key-value pairs and an associated path name. The root path ("/") identifies the top-level dictionary. Additional path components specify the keys for subdictionaries.

For example, the following dictionary can be accessed via two paths. The root path ("/") returns a dictionary with all keys and values. The path "/path1" returns only the dictionary with the "key3" and "key4" properties.

  1. <dict>
  2. <key>key1</key>
  3. <string>val1</string>
  4. <key>key2</key>
  5. <string>val2</string>
  6. <key>path1</key>
  7. <dict>
  8. <key>key3</key>
  9. <string>val3</string>
  10. <key>key4</key>
  11. <string>val4</string>
  12. </dict>
  13. </dict>

Each dictionary can also include the kSCResvLink ("__LINK__") key. The value associated with this key is interpreted as a link to another path. If this key is present, a call to the SCPreferencesPathGetValue function returns the dictionary specified by the link.