Contents

willSleepNotification

A notification that the workspace posts before the device goes to sleep.

Declaration

class let willSleepNotification: NSNotification.Name

Discussion

An observer of this message can delay sleep for up to 30 seconds while handling this notification.

The notification object is the shared NSWorkspace instance. The notification doesn’t contain a userInfo dictionary.

See Also

Responding to Environment Notifications