willLaunchApplicationNotification
A notification that the workspace posts when the Finder is about to launch an app.
Declaration
class let willLaunchApplicationNotification: NSNotification.NameDiscussion
The notification object is the shared NSWorkspace instance. The userInfo dictionary contains the applicationUserInfoKey key with a corresponding instance of NSRunningApplication that represents the affected app.
The system doesn’t post this notification for background apps or for apps that have the LSUIElement key in their Info.plist file. If you want to know when all apps (including background apps) launch or terminate, use key-value observing to monitor the value that returns from the runningApplications method.
See Also
Responding to Environment Notifications
didLaunchApplicationNotificationdidTerminateApplicationNotificationsessionDidBecomeActiveNotificationsessionDidResignActiveNotificationdidHideApplicationNotificationdidUnhideApplicationNotificationdidActivateApplicationNotificationdidDeactivateApplicationNotificationdidRenameVolumeNotificationdidMountNotificationwillUnmountNotificationdidUnmountNotificationdidChangeFileLabelsNotificationactiveSpaceDidChangeNotificationdidWakeNotification