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

# sessionDidBecomeActiveNotification

A notification that the workspace posts after a user session switches in.

```
class let sessionDidBecomeActiveNotification: NSNotification.Name
```

## Discussion

This notification allows an app to re-enable some processing, such as when a switched-out session switches back in.

The notification object is the shared [`NSWorkspace`](/documentation/AppKit/NSWorkspace) instance. The notification doesn’t contain a `userInfo` dictionary.

> Important:
> To receive this notification, use ``doc://com.apple.appkit/documentation/AppKit/NSWorkspace/notificationCenter`` to register for it. If you use a different notification center to register, you won’t receive the notification.

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

---

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)