Instance Method


Launches the specified app.


- (BOOL)launchApplication:(NSString *)appName;



The name of the app to open.

Return Value

YES if the app was successfully launched or was already running; otherwise, NO.


The appName parameter need not be specified with a full path and, in the case of an app wrapper, may be specified with or without the .app extension, as described in Use of .app Extension.

Before this method begins, it posts an NSWorkspaceWillLaunchApplicationNotification to the NSWorkspace object’s notification center. When the operation is complete, it posts an NSWorkspaceDidLaunchApplicationNotification.

It is safe to call this method from any thread in your app in macOS 10.6 and later.

See Also

Manipulating Applications

- launchApplication:showIcon:autolaunch:

Launches the specified app using additional options.

- launchApplicationAtURL:options:configuration:error:

Launches the app at the specified URL.

- hideOtherApplications

Hides all applications other than the sender.


The following keys can be used in the configuration dictionary of the launchApplicationAtURL:options:configuration:error: method. Each key is optional, and if omitted, default behavior is applied.