didChangeExternallyNotification
Posted when the value of one or more keys changes due to incoming data from iCloud.
Declaration
class let didChangeExternallyNotification: NSNotification.NameDiscussion
If your app is running when iCloud delivers changes from another device, the system generates this notification for your app. Use it to update your app’s content in response to the new data.
The user info dictionary can contain additional data about the reason for the notification:
When the NSUbiquitousKeyValueStoreChangeReasonKey key is present, it indicates the reason why the key-value store changed. The value of this key is one of the constants NSUbiquitousKeyValueStoreServerChange, NSUbiquitousKeyValueStoreInitialSyncChange, NSUbiquitousKeyValueStoreQuotaViolationChange, or NSUbiquitousKeyValueStoreAccountChange.
When the NSUbiquitousKeyValueStoreChangedKeysKey key is present, its value is an array of strings, each of which contains the name of a key that changed.
To receive this notification, register for it shortly after launch. Specify the default key-value store object as the object from which you want to receive notifications.