- iOS 2.0+
- macOS 10.0+
- tvOS 9.0+
- watchOS 2.0+
Several functions return a preference value as a Core Foundation property list object. You can use the function
CFGet to determine the value’s type. For more information about property lists, see Property List Programming Topics for Core Foundation.
Core Foundation provides a simple, standard way to manage user (and application) preferences. Core Foundation stores preferences as key-value pairs that are assigned a scope using a combination of user name, application ID, and host (computer) names. This makes it possible to save and retrieve preferences that apply to different classes of users. Core Foundation preferences is useful to all applications that support user preferences. Note that modification of some preferences domains (those not belonging to the “Current User”) requires root privileges (or Admin privileges prior to OS X v10.6)—see Authorization Services Programming Guide for information on how to gain suitable privileges.
Unlike some other Core Foundation types, CFPreferences is not toll-free bridged to its corresponding Cocoa Foundation framework class (
NSUser). CFPreferences is thread-safe.