I've noticed that GitHub launched a new "Clone in Mac" button a couple of months ago, which - when clicked - perform an external protocol request:
github-mac://openRepo/REPOURL
Assuming I want to implement a similar feature for my application, I wonder:
- how do buttons degrade if the user browser doesn't support external protocols
- how to register the protocol handler without requiring user action. In other words, how do you tell browser X to use application GitHub.app in case of protocol github-mac, without asking the user to tweak the browser settings?
- I can see in the above URL an openRepo action, which inform the application about the action to perform. What are the common strategies/patterns to dispatch these requests for a Mac application, so that
github-mac://first
does something different fromgithub-mac://second
?