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

# CFPreferencesAppSynchronize(_:)

Writes to permanent storage all pending changes to the preference data for the application, and reads the latest preference data from permanent storage.

```
func CFPreferencesAppSynchronize(_ applicationID: CFString) -> Bool
```

## Parameters

`applicationID`

The ID of the application whose preferences to write to storage, 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 synchronization was successful, otherwise `false`.

## Discussion

Calling the function [`CFPreferencesSetAppValue(_:_:_:)`](/documentation/CoreFoundation/CFPreferencesSetAppValue(_:_:_:)) is not in itself sufficient for storing preferences. The [`CFPreferencesAppSynchronize(_:)`](/documentation/CoreFoundation/CFPreferencesAppSynchronize(_:)) function writes to permanent storage all pending preference changes for the application. Typically you would call this function after multiple calls to [`CFPreferencesSetAppValue(_:_:_:)`](/documentation/CoreFoundation/CFPreferencesSetAppValue(_:_:_:)). Conversely, preference data is cached after it is first read. Changes made externally are not automatically incorporated. The [`CFPreferencesAppSynchronize(_:)`](/documentation/CoreFoundation/CFPreferencesAppSynchronize(_:)) function reads the latest preferences from permanent storage.

---

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)