---
title: "CFPreferencesCopyApplicationList(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfpreferencescopyapplicationlist(_:_:)"
---

# CFPreferencesCopyApplicationList(_:_:)

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

## Declaration

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

## Parameters

- `userName`: doc://com.apple.corefoundation/documentation/CoreFoundation/kCFPreferencesCurrentUser to search the current-user domain, otherwise doc://com.apple.corefoundation/documentation/CoreFoundation/kCFPreferencesAnyUser to search the any-user domain.
- `hostName`: doc://com.apple.corefoundation/documentation/CoreFoundation/kCFPreferencesCurrentHost to search the current-host domain, otherwise doc://com.apple.corefoundation/documentation/CoreFoundation/kCFPreferencesAnyHost to search the any-host domain.

## Return Value

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

## See Also

### Miscellaneous Functions

- [CFPreferencesAppValueIsForced(_:_:)](corefoundation/cfpreferencesappvalueisforced(_:_:).md)
