<!--
{
  "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/Bundle/didLoadNotification",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@NSBundleDidLoadNotification"
  },
  "title" : "didLoadNotification"
}
-->

# didLoadNotification

A notification that lets observers know when classes are dynamically loaded.

```
class let didLoadNotification: NSNotification.Name
```

## Discussion

When a request is made to a bundle for a class ([`classNamed(_:)`](/documentation/Foundation/Bundle/classNamed(_:)) or [`principalClass`](/documentation/Foundation/Bundle/principalClass)), the bundle dynamically loads the executable code file that contains the class implementation and all other class definitions contained in the file. After the module is loaded, the bundle posts the [`didLoadNotification`](/documentation/Foundation/Bundle/didLoadNotification).

The notification object is the [`Bundle`](/documentation/Foundation/Bundle) instance that dynamically loads classes. The `userInfo` dictionary contains an [`NSLoadedClasses`](/documentation/Foundation/NSLoadedClasses) key.

In a typical use of this notification, an object might want to enumerate the `userInfo` array to check if each loaded class conformed to a certain protocol (say, an protocol for a plug-and-play tool set); if a class does conform, the object would create an instance of that class and add the instance to another [`NSArray`](/documentation/Foundation/NSArray) object.

---

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)