There are some cases where using the high-level API is not appropriate. For example, you may want to allow your application to save a preference value for any user on the current host. Listing 1-8 shows you how to do this.
Listing 1-8 Saving a preference value for any user on the current host
CFStringRef defaultTextColorKey = CFSTR("defaultTextColor"); CFStringRef colorBLUE = CFSTR("BLUE"); // Set up the preference. CFPreferencesSetValue(defaultTextColorKey, colorBLUE, kCFPreferencesCurrentApp, kCFPreferencesAnyUser, kCFPreferencesCurrentHost);