Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LSSetDefaultRoleHandlerForContentType in Yosemite

I experienced a problem with CF function LSSetDefaultRoleHandlerForContentType. This function sets the app as default viewer for the UTI type. In 10.9 it works without problems, but in recent 10.10 build this function fails with return code -54. Doc and related dev forums didn't help. Everything i had found about the issue is that -54 means permErr (Permission Error ?) and that is all.

Maybe someone experienced the issue and can help with some workaround? Thanks in advance!

like image 664
lem Avatar asked Oct 07 '14 17:10

lem


1 Answers

With OS X 10.10 Yosemite LSSetDefaultRoleHandlerForContentType is no longer working/allowed in sandboxed apps.

See this post in Apples Application Sandboxing forum.

Also note the console output when you try to use it:

coreservicesd: Unentitled request to set default handler for content type com.adobe.pdf by pid 31361
like image 90
catlan Avatar answered Oct 03 '22 07:10

catlan