---
title: "open(_:completionHandler:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsextensioncontext/open(_:completionhandler:)"
---

# open(_:completionHandler:)

Asks the system to open a URL on behalf of the currently running app extension.

## Declaration

```swift
func open(_ URL: URL, completionHandler: (@Sendable (Bool) -> Void)? = nil)
```

```swift
func open(_ URL: URL) async -> Bool
```

## Parameters

- `URL`: The URL to open.
- `completionHandler`: A block/closure to be called when the URL has opened. The closure takes a single boolean parameter indicating whether the operation was successful.

## Discussion

Discussion Each extension point determines whether to support this method, or under which conditions to support this method. In iOS,  the Today and iMessage app extension points support this method. An iMessage app extension can use this method only to open its parent app, and only if the parent app is shown on the iOS home screen. important: You can use this method in a Today widget to open the widget’s containing app. If you use this method to open other apps from your Today widget, your App Store submission may require additional review. To learn more, see App Store Review Guidelines and iOS Human Interface Guidelines.
