Returns a Boolean value indicating whether an app is available to handle a URL scheme.
- iOS 3.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
A URL (Universal Resource Locator). At runtime, the system determines if an installed app is registered to handle the URL's scheme. More than one app can be registered to handle a scheme.
The URL can have a common scheme such as
facetime, or a custom scheme. For information about supported schemes, see Apple URL Scheme Reference.
NO if no app installed on the device is registered to handle the URL’s scheme, or if you have not declared the URL’s scheme in your
Info file; otherwise,
When this method returns
YES, iOS guarantees subsequent calls to the
open method with the same URL will successfully launch an app that can handle the URL. The return value does not indicate the validity of the URL, whether the specified resource exists, or, in the case of a universal link, whether an installed app is registered to respond to the universal link.
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
NO. 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. If an app is available to handle the URL, the system will launch it, whether or not you have 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 Safari, allowing the associated website to respond. For more information on universal links, see Allowing Apps and Websites to Link to Your Content.