---
title: NSUbiquitousKeyValueStoreChangeReasonKey
framework: foundation
role: symbol
role_heading: Global Variable
path: foundation/nsubiquitouskeyvaluestorechangereasonkey
---

# NSUbiquitousKeyValueStoreChangeReasonKey

A key that indicates the reason why the key-value store changed.

## Declaration

```swift
let NSUbiquitousKeyValueStoreChangeReasonKey: String
```

## Discussion

Discussion When the iCloud key-value store changes due to an external source, the system generates a didChangeExternallyNotification notification. That notification can include this key. The value of this key is an NSNumber that indicates the reason for the change. Possible values include one of the constants NSUbiquitousKeyValueStoreServerChange, NSUbiquitousKeyValueStoreInitialSyncChange, NSUbiquitousKeyValueStoreQuotaViolationChange, or NSUbiquitousKeyValueStoreAccountChange.

## See Also

### Detecting changes to values

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