Function

CFPreferencesCopyMultiple

Returns a dictionary containing preference values for multiple keys.

Declaration

CFDictionaryRef CFPreferencesCopyMultiple(CFArrayRef keysToFetch, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName);

Parameters

keysToFetch

An array of preference keys the values of which to obtain.

applicationID

The ID of the application whose preferences are searched. Takes the form of a Java package name, such as com.foosoft.

userName

kCFPreferencesCurrentUser to search the current-user domain, otherwise kCFPreferencesAnyUser to search the any-user domain.

hostName

kCFPreferencesCurrentHost to search the current-host domain, otherwise kCFPreferencesAnyHost to search the any-host domain.

Return Value

A dictionary containing the preference values for the keys specified by keysToFetch for the specified domain. If no values were located, returns an empty dictionary. Ownership follows the The Create Rule.

Discussion

Note that values returned from this function are immutable, even if you have recently set the value using a mutable object.

See Also

Getting Preference Values

CFPreferencesCopyAppValue

Obtains a preference value for the specified key and application.

CFPreferencesCopyKeyList

Constructs and returns the list of all keys set in the specified domain.

CFPreferencesCopyValue

Returns a preference value for a given domain.

CFPreferencesGetAppBooleanValue

Convenience function that directly obtains a Boolean preference value for the specified key.

CFPreferencesGetAppIntegerValue

Convenience function that directly obtains an integer preference value for the specified key.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software