ANE-Can-Open-URL is a native extension for iOS to detect whether an app is installed to handle a specific URL scheme. The extension has a single command that checks for a URL handler, so an application can accurately decide is the current device has the proper software to open a URL, such as a YouTube video.

Since the extension rely on the URL scheme, it’s easy to test several different services. In order to test if the device can open an iTunes URL, for instance, the URL scheme is itms-apps://, or Twitter (twitter://) or Facebook (fb://).

Sample

// Test iTunes
if( CanOpenUrl.canOpen("itms-apps://itunes.apple.com/app/stick-cricket/id406781620?ls=1&mt=8")) {
}

// Test Twitter
if( CanOpenUrl.canOpen("twitter://user?screen_name=sticksports")) {
}

// Test Facebook
if( CanOpenUrl.canOpen("fb://page/6340028662")) {
}
Air Native Extension, iOS . URL.