<!--
{
  "availability" : [
    "macOS: 10.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SystemConfiguration",
  "identifier" : "/documentation/SystemConfiguration/SCPreferencesAddValue(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "System Configuration"
    ],
    "preciseIdentifier" : "c:@F@SCPreferencesAddValue"
  },
  "title" : "SCPreferencesAddValue(_:_:_:)"
}
-->

# SCPreferencesAddValue(_:_:_:)

Associates the specified value with the specified preference key.

```
func SCPreferencesAddValue(_ prefs: SCPreferences, _ key: CFString, _ value: CFPropertyList) -> Bool
```

## Parameters

`prefs`

The preferences session.

`key`

The preference key.

`value`

The value to associate with the preference key.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the value was added; <doc://com.apple.documentation/documentation/Swift/false> if the key already exists or if an error occurred.

## Discussion

To commit these changes to permanent storage, you must call [`SCPreferencesCommitChanges(_:)`](/documentation/SystemConfiguration/SCPreferencesCommitChanges(_:)).

---

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)