Constructs and returns the list of all applications that have preferences in the scope of the specified user and host.


func CFPreferencesCopyApplicationList(_ userName: CFString, _ hostName: CFString) -> CFArray?



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


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

Return Value

The list of application IDs. Ownership follows the The Create Rule.

See Also

Miscellaneous Functions

func CFPreferencesAppValueIsForced(CFString, CFString) -> Bool

Determines whether or not a given key has been imposed on the user.

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