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

# CFPreferencesGetAppBooleanValue(_:_:_:)

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

```
func CFPreferencesGetAppBooleanValue(_ key: CFString, _ applicationID: CFString, _ keyExistsAndHasValidFormat: UnsafeMutablePointer<DarwinBoolean>?) -> Bool
```

## Parameters

`key`

The preference key whose value to obtain. The key must specify a preference whose value is of type `Boolean`.

`applicationID`

The identifier of the application whose preferences are searched, typically [`kCFPreferencesCurrentApplication`](/documentation/CoreFoundation/kCFPreferencesCurrentApplication). Do not pass `NULL` or [`kCFPreferencesAnyApplication`](/documentation/CoreFoundation/kCFPreferencesAnyApplication). Takes the form of a Java package name, such as `com.foosoft`.

`keyExistsAndHasValidFormat`

On return, `true` if the preference value for the specified key was located and found to be of type `Boolean`, otherwise `false`.

## Return Value

The preference data for the specified key and application, or if no value was located, `false`.

## 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)