Search code examples
iosruby

API for iOS registered protocol handlers


Is there an API where I can check if a registered iOS protocol handler exists or not? I'm looking to figure out if a few protocol handlers that were given to me are valid.


Solution

  • If you're talking about application URL schemes, you can use:

        [[UIApplication sharedApplication] canOpenURL:<#(NSURL *)#>]
    

    which will return YES if there is an app that can open the URL scheme or NO if there isn't.