launchApplication(withBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifier:)
Launches the app corresponding to the specified bundleIdentifier.
Declaration
func launchApplication(withBundleIdentifier bundleIdentifier: String, options: NSWorkspace.LaunchOptions = [], additionalEventParamDescriptor descriptor: NSAppleEventDescriptor?, launchIdentifier identifier: AutoreleasingUnsafeMutablePointer<NSNumber?>?) -> BoolParameters
- bundleIdentifier:
A bundle identifier string. This value corresponds to the value in the
CFBundleIdentifierkey of the app’sInfo.plistfile. For example, the bundle identifier of the TextEdit app iscom.apple.TextEdit. - options:
Options to use when launching the app. Values for this parameter are described in Launchoptions.
- descriptor:
Additional options specified in an AppleEvent-style descriptor. For example, you could use this parameter to specify additional documents to open when the app is launched.
- identifier:
The
launchIdentifiersare currently unused, and you should passNULL.
Return Value
Discussion
It is safe to call this method from any thread of your app.
See Also
Methods
open(_:options:configuration:)open(_:withApplicationAt:options:configuration:)openFile(_:)openFile(_:withApplication:)openFile(_:withApplication:andDeactivate:)openFile(_:from:at:in:)launchApplication(_:)launchApplication(_:showIcon:autolaunch:)launchApplication(at:options:configuration:)performFileOperation(_:source:destination:files:tag:)fullPath(forApplication:)absolutePathForApplication(withBundleIdentifier:)open(_:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers:)mountedRemovableMedia()mountedLocalVolumePaths()