No proper replacement for LaunchServices functions

Apple deprecated launch service calls like LSCopyAllRoleHandlersForContentType, referring to -[NSWorkspace URLsForApplicationsToOpenContentType:] instead.

However all those new NSWorkspace methods do not have the crucial LSRolesMask the launch service calls have.

For example, I have code that looks up all alternative shells, and with LSCopyAllRoleHandlersForContentType I could simply provide LSRoleMask.shell to restrict the returned bundle identifiers to shells only.

This is not the first time Apple deprecates stuff without a proper replacement and I don't really get it.

Every OS update is basically a downgrade.

Or is there another way to replicate the old launch service call behavior?

I think the path forward here is clear:

  1. File an enhancement request for an API that covers the missing functionality, making sure to explain why that functionality is important to your app.

  2. Continue using the LS API in the interim.

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I refuse to use Feedback Assistant anymore, out of the ~50 issues I filed there exactly 0 where fixed or even replied to.

Even some 3 or 4 year old reports are still not fixed and the issue persists to this day.

No proper replacement for LaunchServices functions
 
 
Q