<!--
{
  "availability" : [
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWorkspace/open(_:withApplicationAt:configuration:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWorkspace(im)openURLs:withApplicationAtURL:configuration:completionHandler:"
  },
  "title" : "open(_:withApplicationAt:configuration:completionHandler:)"
}
-->

# open(_:withApplicationAt:configuration:completionHandler:)

Opens one or more URLs asynchronously in the specified app using the provided options.

```
func open(_ urls: [URL], withApplicationAt applicationURL: URL, configuration: NSWorkspace.OpenConfiguration, completionHandler: (@Sendable (NSRunningApplication?, (any Error)?) -> Void)? = nil)
```

## Parameters

`urls`

The URL to open.

`applicationURL`

A URL specifying the location of the app in the file system.

`configuration`

The options that indicate how you want to open the URLs.

`completionHandler`

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:

- app: 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 `nil`.
- error: On failure, this parameter contains an <doc://com.apple.documentation/documentation/Foundation/NSError> object indicating the reason for the failure. If the method opened the URLs successfully, this parameter is `nil`.

## Discussion

You may call this method safely from any thread of your app.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)