open(_:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers:)
Opens one or more files from an array of URLs.
Declaration
func open(_ urls: [URL], withAppBundleIdentifier bundleIdentifier: String?, options: NSWorkspace.LaunchOptions = [], additionalEventParamDescriptor descriptor: NSAppleEventDescriptor?, launchIdentifiers identifiers: AutoreleasingUnsafeMutablePointer<NSArray?>?) -> BoolParameters
- urls:
An array of
NSURLobjects, each one identifying a URL for the app to open. - bundleIdentifier:
A bundle identifier string or
nilto use the default system bindings. This value corresponds to the value in theCFBundleIdentifierkey 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.
- identifiers:
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:)launchApplication(withBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifier:)mountedRemovableMedia()mountedLocalVolumePaths()