Pixel Envy

Written by Nick Heer.

Sandboxing and 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.

Michael Tsai:

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.

This limitation kind of makes sense if you squint a bit: sandboxing puts a wall around what an app knows about its external environment, and an app ignorant of everything else it shares a processor with cannot possibly configure defaults for the rest of the machine. Some of the people replying to Simmons suggest creating a utility “helper” app, distributed separately, to set a default URL handler for feed URL schemes — an almost comically inefficient workaround. I like sandboxing in principle, but stuff like this makes its MacOS implementation feel thoughtless and shallow.