Opens one or more URLs asynchronously in the specified app using the provided options.
- macOS 10.15+
The URL to open.
A URL specifying the location of the app in the file system.
The options that indicate how you want to open the URLs.
The completion handler block to call asynchronously with the results. AppKit executes the completion handler on a concurrent queue. The handler block has no return value and takes the following parameters:
On success, this parameter contains a reference to the app that opened the URLs. If the app didn't open the URLs successfully, this parameter is
On failure, this parameter contains an
NSErrorobject indicating the reason for the failure. If the method opened the URLs successfully, this parameter is
You may call this method safely from any thread of your app.