---
title: "open(_:configuration:completionHandler:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsworkspace/open(_:configuration:completionhandler:)"
---

# open(_:configuration:completionHandler:)

Opens a URL asynchronously using the provided options.

## Declaration

```swift
func open(_ url: URL, configuration: NSWorkspace.OpenConfiguration, completionHandler: (@Sendable (NSRunningApplication?, (any Error)?) -> Void)? = nil)
```

```swift
func open(_ url: URL, configuration: NSWorkspace.OpenConfiguration) async throws -> NSRunningApplication
```

## Parameters

- `url`: The URL to open.
- `configuration`: The options that indicate how you want to open the URL.
- `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:

## Discussion

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

## See Also

### Opening URLs

- [open(_:withApplicationAt:configuration:completionHandler:)](appkit/nsworkspace/open(_:withapplicationat:configuration:completionhandler:).md)
- [open(_:)](appkit/nsworkspace/open(_:).md)
