---
title: "CFPreferencesAppValueIsForced(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfpreferencesappvalueisforced(_:_:)"
---

# CFPreferencesAppValueIsForced(_:_:)

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

## Declaration

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

## Parameters

- `key`: The key you are querying.
- `applicationID`: The application’s ID, typically doc://com.apple.corefoundation/documentation/CoreFoundation/kCFPreferencesCurrentApplication. Do not pass NULL or doc://com.apple.corefoundation/documentation/CoreFoundation/kCFPreferencesAnyApplication. Takes the form of a Java package name, com.foosoft.

## Return Value

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

## Discussion

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.

## See Also

### Miscellaneous Functions

- [CFPreferencesCopyApplicationList(_:_:)](corefoundation/cfpreferencescopyapplicationlist(_:_:).md)
