@TomCatchesides re : is there a handler ?
On macOS you might prefer NSWorkspace URLForApplicationToOpenURL
This returns the URL for the default app if there is one
I’d bet MBS has a call for this as well
This trick is how I get my help files to open in your web browser even if you have HTML files set to open with a text editor. Ask NSWorkspace which app opens https:// and send the file there instead of FolderItem.Open.
There’s no guarantee it WILL be any particular one
The order isnt guaranteed
All this will tell you is there IS something that says it can open a particular URL
And, unlike the launch services API there doesnt seem to be one that returns the URI’s for everything that says it CAN open a specific URI
But it strikes me there should be since that data is all recorded somewhere in the launch services databases
I added the declares for this in the Ohanaware App Kit, I don’t recall is I used NSWorkspace or not. I’ll check later on in the day.
I needed to know which e-mail client the customer was using so I could offer to attach files or not to the e-mail. Apple’s Sharing Services completely suck in recent years, Apple used to handle this for you, but since “Privacy” they only care about Apple Mail.