---
title: "SCPreferencesCommitChanges(_:)"
framework: systemconfiguration
role: symbol
role_heading: Function
path: "systemconfiguration/scpreferencescommitchanges(_:)"
---

# SCPreferencesCommitChanges(_:)

Commits changes made to the configuration preferences to persistent storage.

## Declaration

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

## Parameters

- `prefs`: The preferences session.

## Return Value

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

## Discussion

Discussion Implicit calls to the SCPreferencesLock(_:_:) and 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 SCPreferencesApplyChanges(_:) function.

## See Also

### Applying and Committing Changes

- [SCPreferencesApplyChanges(_:)](systemconfiguration/scpreferencesapplychanges(_:).md)
- [SCPreferencesSynchronize(_:)](systemconfiguration/scpreferencessynchronize(_:).md)
