How to Bind Application URL Using Cocoa

On the command line, you can run, for example, "open http://www.example.com " and display this home page in the default browser.

Similarly, you can run "open callto: xyz123" to open a skype call to xyz123.

I would like to do the same with a custom web browser without replacing the default web browser. My idea is to register a new protocol (mb) so that when you start "open mb: //www.example.com" this web page will open in this new user browser.

How can an application register itself to handle URLs with a specific protocol?

+4
source share
1 answer

Found it, it is in the Info.plist file, using the key CFBundleURLTypes

+4
source

All Articles