Contents

sessionDidResignActiveNotification

A notification that the workspace posts before a user session switches out.

Declaration

class let sessionDidResignActiveNotification: NSNotification.Name

Discussion

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.

See Also

Responding to Environment Notifications