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

# CFPreferencesAppValueIsForced(_:_:)

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

```
func CFPreferencesAppValueIsForced(_ key: CFString, _ applicationID: CFString) -> Bool
```

## Parameters

`key`

The key you are querying.

`applicationID`

The application’s ID, typically [`kCFPreferencesCurrentApplication`](/documentation/CoreFoundation/kCFPreferencesCurrentApplication). Do not pass `NULL` or [`kCFPreferencesAnyApplication`](/documentation/CoreFoundation/kCFPreferencesAnyApplication). Takes the form of a Java package name, `com.foosoft`.

## Return Value

`true` if value of the key cannot be changed by the user, otherwise `false`.

## Discussion

In cases where machines and/or users are under some kind of management, you should use this function to determine whether or not to disable UI elements corresponding to those preference keys.

---

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)