<!--
{
  "availability" : [
    "iOS: 2.0.0 - 7.0.0",
    "iPadOS: 2.0.0 - 7.0.0",
    "tvOS: 9.0.0 - 9.0.0",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 2.0.0 - 2.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFPreferencesCopyApplicationList(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFPreferencesCopyApplicationList"
  },
  "title" : "CFPreferencesCopyApplicationList(_:_:)"
}
-->

# CFPreferencesCopyApplicationList(_:_:)

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?
```

## Parameters

`userName`

[`kCFPreferencesCurrentUser`](/documentation/CoreFoundation/kCFPreferencesCurrentUser) to search the current-user domain, otherwise [`kCFPreferencesAnyUser`](/documentation/CoreFoundation/kCFPreferencesAnyUser) to search the any-user domain.

`hostName`

[`kCFPreferencesCurrentHost`](/documentation/CoreFoundation/kCFPreferencesCurrentHost) to search the current-host domain, otherwise [`kCFPreferencesAnyHost`](/documentation/CoreFoundation/kCFPreferencesAnyHost) to search the any-host domain.

## Return Value

The list of application IDs. Ownership follows the [The Create Rule](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-103029).

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)