Tuesday, September 1, 2020 [Tweets] [Favorites]

Setting Default URL Handlers

Brent Simmons:

NetNewsWire lets you set the default RSS reader to itself or any other RSS reader. It’s an important feature.

Now that we’re sandboxing the app, we’re losing that feature, as LSSetDefaultHandlerForURLScheme is apparently disallowed for sandboxed apps[…]

This is a good example of how the sandbox still feels half-baked. 9 years later, it’s not documented that this function doesn’t work in sandboxed apps. There’s no replacement API, e.g. that asks the user whether it’s OK to change the URL handler. The system UI for setting the preferred RSS app has been removed, so the user can’t do it manually.

Was it worth it? Was there an epidemic of URL handler changers that we’re being protected from? Apps in the Mac App Store need to be sandboxed, and if this API were enabled in the sandbox it could in theory be policed by App Review, anyway. Apps outside the Mac App Store don’t need to be sandboxed, and malware certainly isn’t, so the restriction only affects legitimate apps that are trying to do the right thing—which the restriction discourages.

Quinn:

If you’re sandboxing just because it’s the right thing to do, you should be able to move this call to a non-sandboxed XPC Service

However, this would not be allowed in the Mac App Store.

Erik Schwiebert:

Outlook used to have a pref like that to set itself as the default mail reader. We deleted it when we sandboxed the Mac Office apps, and now point admins to tools like duti. Not end-user friendly, but I don’t know a way around it.

2 Comments

[…] Sandboxing and Default URL Handlers […]

I never quite understood why the UI to set defaults was removed. Too confusing/geeky?

How will iOS 14 handle this? Will that be a starting point for a potential new UX for the Mac?

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment