---
title: NSUbiquitousKeyValueStoreInitialSyncChange
framework: foundation
role: symbol
role_heading: Global Variable
path: foundation/nsubiquitouskeyvaluestoreinitialsyncchange
---

# NSUbiquitousKeyValueStoreInitialSyncChange

A constant that indicates the initial attempt to load keys and values from iCloud is in progress.

## Declaration

```swift
var NSUbiquitousKeyValueStoreInitialSyncChange: Int { get }
```

## Discussion

Discussion The system downloads the existing keys and values from iCloud when someone logs into a device using their Apple account. If you try to write a key and value to the iCloud data store while this initial download is in progress, the system generates the didChangeExternallyNotification notification with this key. Schedule the write operations after a delay to give the system time to download the data and ensure the local copies match the truth in iCloud.

## See Also

### Detecting changes to values

- [didChangeExternallyNotification](foundation/nsubiquitouskeyvaluestore/didchangeexternallynotification.md)
- [NSUbiquitousKeyValueStoreChangeReasonKey](foundation/nsubiquitouskeyvaluestorechangereasonkey.md)
- [NSUbiquitousKeyValueStoreChangedKeysKey](foundation/nsubiquitouskeyvaluestorechangedkeyskey.md)
- [NSUbiquitousKeyValueStoreServerChange](foundation/nsubiquitouskeyvaluestoreserverchange.md)
- [NSUbiquitousKeyValueStoreQuotaViolationChange](foundation/nsubiquitouskeyvaluestorequotaviolationchange.md)
- [NSUbiquitousKeyValueStoreAccountChange](foundation/nsubiquitouskeyvaluestoreaccountchange.md)
