Posted when the Finder is about to launch an app.
SDK
- macOS 10.0+
Framework
- App
Kit
Declaration
NSNotification Name NSWorkspaceWillLaunchApplicationNotification;
Discussion
The notification object is the shared NSWorkspace
instance. In macOS 10.6 and later the user
dictionary contains the NSWorkspace
key with a corresponding instance of NSRunning
that represents the affected app.
In OS X v10.5 and earlier the user
dictionary contains the keys and values described in Table 1.
The system does not post this notification for background apps or for apps that have the LSUIElement
key in their Info
file. If you want to know when all apps (including background apps) are launched or terminated, use key-value observing to monitor the value returned by the running
method.