Global Variable

NSUserDefaultsDidChangeNotification

Posted when user defaults are changed within the current process.

Declaration

const NSNotificationName NSUserDefaultsDidChangeNotification;

Discussion

This notification is posted on the thread that changes the user defaults. The notification object is the NSUserDefaults object. The notification doesn't contain a userInfo dictionary.

This notification isn't posted when changes are made outside the current process, or when ubiquitous defaults change. You can use key-value observing to register observers for specific keys of interest in order to be notified of all updates, regardless of whether changes are made within or outside the current process.

See Also

Notifications

NSUserDefaultsSizeLimitExceededNotification

Posted when more data is stored in user defaults than is allowed.

NSUbiquitousUserDefaultsCompletedInitialSyncNotification

Posted when ubiquitous defaults finish downloading data, either the first time a device is connected to an iCloud account or when a user switches their primary iCloud account.

NSUbiquitousUserDefaultsDidChangeAccountsNotification

Posted when the user changes the primary iCloud account.

NSUbiquitousUserDefaultsNoCloudAccountNotification

Posted when a cloud default is set, but no iCloud user is logged in.