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

# canOpenURL(_:)

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

```
nonisolated func canOpenURL(_ url: URL) -> Bool
```

## Parameters

`url`

A URL (Universal Resource Locator). At runtime, the system determines if the device has an installed app registered to handle the URL’s scheme. The device can have more than one app registered to handle a scheme.

    The URL can have a common scheme such as     `http`    ,     `https`    ,     `tel`    , or     `facetime`    , or a custom scheme. For information about supported schemes, see     [Apple URL Scheme Reference](https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007899)    .

## Return Value

<doc://com.apple.documentation/documentation/Swift/false> if the device doesn’t have an installed app registered to handle the URL’s scheme, or if you haven’t declared the URL’s scheme in your `Info.plist` file; otherwise, <doc://com.apple.documentation/documentation/Swift/true>.

## Discussion

When this method returns <doc://com.apple.documentation/documentation/Swift/true>, iOS guarantees subsequent calls to the [`open(_:options:completionHandler:)`](/documentation/UIKit/UIApplication/open(_:options:completionHandler:)) method with the same URL will successfully launch an app that can handle the URL. The return value doesn’t indicate the validity of the URL, whether the specified resource exists, or, in the case of a universal link, whether the device has an installed app registered to respond to the universal link.

You can call this method safely on a thread that isn’t the main thread.

> Important:
> If you link your app on or after iOS 9.0, you must declare the URL schemes you pass to this method by adding the `LSApplicationQueriesSchemes` key to your app’s `Info.plist` file. This method always returns <doc://com.apple.documentation/documentation/Swift/false> for undeclared schemes, even if the device doesn’t have a registered app installed. Apps linked on or after iOS 15 are limited to a maximum of 50 entries in the `LSApplicationQueriesSchemes` key. Apps linked on or after iOS 27 are limited to a maximum of 25 entries in the `LSApplicationQueriesSchemes` key. To learn more about the key, see [LSApplicationQueriesSchemes](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/plist/info/LSApplicationQueriesSchemes).

If you link your app against an earlier version of iOS but it is running in iOS 9.0 or later, you can call this method up to 50 times. After reaching that limit, subsequent calls always return <doc://com.apple.documentation/documentation/Swift/false>. If the user reinstalls or upgrades the app, iOS resets the limit.

Unlike this method, the [`open(_:options:completionHandler:)`](/documentation/UIKit/UIApplication/open(_:options:completionHandler:)) method isn’t constrained by the `LSApplicationQueriesSchemes` requirement. If an app is available to handle the URL, the system will launch it, even if you haven’t declared the scheme.

Using universal links instead of custom URL schemes removes the need to use this method to validate target links; if no app is available to handle a universal link, iOS routes it to the person’s default browser, allowing the associated website to respond. For more information on universal links, see <doc://com.apple.documentation/documentation/Xcode/allowing-apps-and-websites-to-link-to-your-content>.

## See Also

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

Attempts to open the resource at the specified URL.



---

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)