O'Reilly logo

Modding Mac OS X by Erica Sadun

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recovering Preferences Settings by Domain

In the world of Mac OS X development, CoreFoundation refers to the framework provided by Apple to its developers. The CoreFoundation framework provides a set of data types and routines that simplify application development. By conforming to the CoreFoundation, programmers can build applications that take advantage of already-established utilities, such as those that read and write preference files. When searching for preferences, the CoreFoundation (and, hence, the applications, system services, and utilities that use it) demands three pieces of information: the application identifier (the application being used), a host name (the computer being used), and the user ID (the user’s account name). These items help determine where to look for the preference: user domain, local domain, or network domain. In addition, each preference has three official qualifiers:

  • Whether the preference applies only to the current user or to all users

  • Whether the preference applies only to the current host or to all hosts

  • Whether the preference applies only to the current application or to all applications

Knowing these three parameters helps determine where (and when) to recover preferences. There’s also an official search order for recovering preferences, which is:

  1. Current User/Current Application/Local Host

  2. Current User/Current Application/Network Domain

  3. Current User/All Applications/Local Host

  4. Current User/All Applications/Network Domain

  5. Any User/Current ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required