In recent versions of OS X—I think this was introduced in Yosemite—changing the default browser by calling
LSSetDefaultHandlerForURLScheme
displays a prompt that gives the user the option of accepting the new default browser, or sticking with their existing one:Do you want to change your default web browser to “new browser” or keep using “old browser”?
Your default web browser opens when you click links in places like email messages, documents, and other apps.
The call to
LSSetDefaultHandlerForURLScheme
returns immediately, before the user has responded to this prompt, so checking the return value doesn't give any indication of the user's choice.Is anyone aware of a way of checking what the user chose? There's some UI in my application that should change to indicate if it's currently the default browser, so it's useful to know if the call to
LSSetDefaultHandlerForURLScheme
resulted in a change.I haven't been able to find any documentation about this prompt. I have no problem with the prompt appearing, but if bypassing it is an option that'd be fine too.