Returns a Boolean value indicating whether or not the URL’s scheme can be handled by some app installed on the device.
- iOS 3.0+
- tvOS 9.0+
A URL (Universal Resource Locator). At runtime, the system tests the URL’s scheme to determine if there is an installed app that is registered to handle the scheme. More than one app can be registered to handle a scheme.
The URL you pass to this method can have a common scheme or a custom scheme.
false if there is no app installed on the device that is registered to handle the URL’s scheme, or if you have not declared the URL’s scheme in your
Info file; otherwise,
Read the Discussion section for more information on conditions that affect the return value.
When this method returns
true, iOS guarantees that subsequent calls to the
open method with the same URL will successfully launch an app that can handle that URL. The return value does not indicate the validity of the URL or whether the specified resource exists.
If your app is linked against an earlier version of iOS but 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
false. If the user reinstalls or upgrades the app, iOS resets the limit.
Unlike this method, the
open method is not constrained by the
LSApplication requirement. That method works if an app is available to open the URL, whether or not you have declared the scheme.