Contents

CFPreferencesCopyMultiple(_:_:_:_:)

Returns a dictionary containing preference values for multiple keys.

Declaration

func CFPreferencesCopyMultiple(_ keysToFetch: CFArray?, _ applicationID: CFString, _ userName: CFString, _ hostName: CFString) -> CFDictionary

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