Type Property

didUnmountNotification

Posted when the Finder did unmount a device.

Declaration

class let didUnmountNotification: NSNotification.Name

Discussion

This notification is delivered even if a volume was forcibly and immediately made unavailable, such as when a drive is simply unplugged.

The notification object is the shared NSWorkspace instance. The userInfo dictionary contains a key @"NSDevicePath" that returns the path where the device was mounted, as a string.

See Also

Notifications

class let willLaunchApplicationNotification: NSNotification.Name

Posted when the Finder is about to launch an app.

class let sessionDidResignActiveNotification: NSNotification.Name

Posted before a user session is switched out.

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 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.