Type Property

sessionDidResignActiveNotification

Posted before a user session is switched out.

Declaration

class let sessionDidResignActiveNotification: NSNotification.Name

Discussion

This allows an app to disable some processing when its user session is switched out, and re-enable when that session gets switched back in, for example.

The notification object is the shared NSWorkspace instance. The notification does not contain a userInfo dictionary.

If an app is launched in an inactive session, sessionDidResignActiveNotification is sent after willFinishLaunchingNotification and before sending didFinishLaunchingNotification.

See Also

Notifications

class let willLaunchApplicationNotification: NSNotification.Name

Posted when the Finder is about to launch an app.

class let didActivateApplicationNotification: NSNotification.Name

Posted when the Finder is about to activate an app.

class let didRenameVolumeNotification: NSNotification.Name

Posted when a volume changes its name and/or mount path. These typically change simultaneously, in which case only one notification is posted.

class let didMountNotification: NSNotification.Name

Posted when a new device has been mounted.

class let willUnmountNotification: NSNotification.Name

Posted when the Finder is about to unmount a device.

class let didUnmountNotification: NSNotification.Name

Posted when the Finder did unmount a device.

class let didPerformFileOperationNotification: NSNotification.Name

Posted when a file operation has been performed in the receiving app.

Deprecated
class let didChangeFileLabelsNotification: NSNotification.Name

Posted when the Finder file labels or colors change.

class let didWakeNotification: NSNotification.Name

Posted when the machine wakes from sleep.

class let willPowerOffNotification: NSNotification.Name

Posted when the user has requested a logout or that the machine be powered off.

class let willSleepNotification: NSNotification.Name

Posted before the machine goes to sleep.

class let screensDidSleepNotification: NSNotification.Name

Posted when the machine’s screen goes to sleep.

class let screensDidWakeNotification: NSNotification.Name

Posted when the machine’s screens wake.

class let accessibilityDisplayOptionsDidChangeNotification: NSNotification.Name

Posted when any of the accessibility display options change.

Volume Mounting Notification User Info Keys

The following keys are available in the userInfo parameter of the notification named didRenameVolumeNotification.

NSWorkspaceDidRenameVolumeNotification User Info Keys

The following keys are available in the userInfo parameter of the notification named didRenameVolumeNotification.