---
title: synchronize()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/userdefaults/synchronize()
---

# synchronize()

Waits for any pending asynchronous updates to the defaults database and returns; this method is unnecessary and shouldn’t be used.

## Declaration

```swift
func synchronize() -> Bool
```

## Return Value

Return Value true if the data was saved successfully to disk, otherwise false.

## See Also

### Related Documentation

- [removePersistentDomain(forName:)](foundation/userdefaults/removepersistentdomain(forname:).md)
- [persistentDomain(forName:)](foundation/userdefaults/persistentdomain(forname:).md)
- [setPersistentDomain(_:forName:)](foundation/userdefaults/setpersistentdomain(_:forname:).md)

### Deprecated

- [init(user:)](foundation/userdefaults/init(user:).md)
- [resetStandardUserDefaults()](foundation/userdefaults/resetstandarduserdefaults().md)
- [persistentDomainNames()](foundation/userdefaults/persistentdomainnames().md)
- [completedInitialCloudSyncNotification](foundation/userdefaults/completedinitialcloudsyncnotification.md)
- [didChangeCloudAccountsNotification](foundation/userdefaults/didchangecloudaccountsnotification.md)
- [noCloudAccountNotification](foundation/userdefaults/nocloudaccountnotification.md)
- [Language-Dependent Information Constants](foundation/language-dependent-information-constants.md)
