<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/didBecomeMainNotification",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@NSWindowDidBecomeMainNotification"
  },
  "title" : "didBecomeMainNotification"
}
-->

# didBecomeMainNotification

A notification that the window object became the main window.

```
class let didBecomeMainNotification: NSNotification.Name
```

## Discussion

The notification object is the `NSWindow` object that has become the main window. This notification doesn’t contain a `userInfo` dictionary.

To observe this notification using Swift concurrency, use [`NSWindow.DidBecomeMainMessage`](/documentation/AppKit/NSWindow/DidBecomeMainMessage).

---

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)