Check if custom URL scheme is definedposted on July 15,201 2 by John muchow in core services
Custom URL schemes are the apple approved way for one application to communicate with another. For example, you can launch the phone application to make a call using the custom URLTel ://. Likewise, you can call a third party (non Apple) application using a custom URL, and similarly, other applications call invoke your app if you define a custom URL.
If you plan to call another application via a custom URL scheme on iOS, here a quick tip to check if a specific URL scheme is defined. the two examples below show the code for creating an nsurl object with the destination URL scheme and using the shared application instance to verify if the URL can be opened:
// If Facebook application installed If ( [ [ uiapplication sharedapplication ] canopenurl : [ nsurl urlwithstring : @ "FB: // " ] ) { DO something... } // If eBay application installed If ( [ [ uiapplication sharedapplication ] canopenurl : [ nsurl urlwithstring : @ "eBay: // " ] ) { DO something... }
There are no restrictions on who can define what m URL. for example, FB: // is not necessarily limited to Facebook, so this process is not entirely foolproof. from what I 've read, Apple does not define the process for determining which application will be called if more than one app has registered the same URL.
Here are a few posts on getting started with custom URL schemes:
-Launching an application via a custom URL Scheme
-Launching other apps within an iPhone application
-Launching other apps within an iPhone application (Part 2)