sessionDidResignActiveNotification
A notification that the workspace posts before a user session switches out.
Declaration
class let sessionDidResignActiveNotification: NSNotification.NameDiscussion
This notification allows an app to disable some processing, such as when its user session switches out, and re-enable when that session switches back in.
The notification object is the shared NSWorkspace instance. The notification doesn’t contain a userInfo dictionary.
If an app launches in an inactive session, the workspace sends sessionDidResignActiveNotification after willFinishLaunchingNotification and before sending didFinishLaunchingNotification.
To observe this notification using Swift concurrency, use NSWorkspace.SessionDidResignActiveMessage.
See Also
Responding to Environment Notifications
willLaunchApplicationNotificationdidLaunchApplicationNotificationdidTerminateApplicationNotificationsessionDidBecomeActiveNotificationdidHideApplicationNotificationdidUnhideApplicationNotificationdidActivateApplicationNotificationdidDeactivateApplicationNotificationdidRenameVolumeNotificationdidMountNotificationwillUnmountNotificationdidUnmountNotificationdidChangeFileLabelsNotificationactiveSpaceDidChangeNotificationdidWakeNotification