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

# SCPreferencesCommitChanges(_:)

Commits changes made to the configuration preferences to persistent storage.

```
func SCPreferencesCommitChanges(_ prefs: SCPreferences) -> Bool
```

## Parameters

`prefs`

The preferences session.

## Return Value

`TRUE` if the lock was obtained; `FALSE` if an error occurred.

## Discussion

Implicit calls to the [`SCPreferencesLock(_:_:)`](/documentation/SystemConfiguration/SCPreferencesLock(_:_:)) and [`SCPreferencesUnlock(_:)`](/documentation/SystemConfiguration/SCPreferencesUnlock(_:)) functions are made if exclusive access has not already been established.

> Note:
> This function commits changes to persistent storage. To apply the changes to the running system, use the ``doc://com.apple.systemconfiguration/documentation/SystemConfiguration/SCPreferencesApplyChanges(_:)`` function.

---

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)