<!--
{
  "availability" : [
    "iOS: 2.0.0 - 10.0.0",
    "iPadOS: 2.0.0 - 10.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "tvOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIApplication/openURL(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIApplication(im)openURL:"
  },
  "title" : "openURL(_:)"
}
-->

# openURL(_:)

Attempts to open the resource at the specified URL.

```
func openURL(_ url: URL) -> Bool
```

## Parameters

`url`

A URL (Universal Resource Locator). UIKit supports many common schemes, including the `http`, `https`, `tel`, `facetime`, and `mailto` schemes. You can also employ custom URL schemes associated with apps installed on the device.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the resource located by the URL was successfully opened; otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

The URL you pass to this method can identify a resource in the app that calls the method, or a resource to be handled by another app. If the resource is to be handled another app, invoking this method might cause the calling app to quit so the other can launch.

To check if there is an installed app that can handle a scheme, call the [`canOpenURL(_:)`](/documentation/UIKit/UIApplication/canOpenURL(_:)) method before calling this one. Be sure to read the description of that method for an important note about registering the schemes you want to employ.

## See Also

[`application(_:handleOpen:)`](/documentation/UIKit/UIApplicationDelegate/application(_:handleOpen:))

Asks the delegate to open a resource identified by URL.

[`canOpenURL(_:)`](/documentation/UIKit/UIApplication/canOpenURL(_:))

Returns a Boolean value that indicates whether an app is available to handle a URL scheme.



---

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)