<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/UserDefaults/didChangeNotification",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@NSUserDefaultsDidChangeNotification"
  },
  "title" : "didChangeNotification"
}
-->

# didChangeNotification

Posted when the current process changes the value of a setting.

```
class let didChangeNotification: NSNotification.Name
```

## Discussion

When you write a new value to a setting, or remove an existing value, the system
generates this notification to alert you that your app’s settings changed. Use this
notification in other parts of your app to incorporate updated settings. The
system posts this notification on the same thread you used to make the change.

If a different process changes your app’s settings, the system doesn’t generate this
notification. To detect changes made by another process, register a key-value observer
on the [`UserDefaults`](/documentation/Foundation/UserDefaults) object. Key-value observing reports all updates to setting
values, regardless of which process made the change.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)