I can't get my QuickLook Plugin to run when built on OSX Mavericks with Xcode 5.1. The meat of the plugin is quite simple (<20 lines of code). It simply makes a system call, and sends the resulting string to QLPreviewRequestSetDataRepresentation(..)
.
I originally made the project on Snow Leopard or Mt Lion, using Xcode 4.6. I was able to compile and run the project no problem. When I migrated to Mavericks, I was able to copy my old .qlgenerator
file to ~/Library/QuickLook
and the plugin worked fine. However now I need to re-compile the project with Xcode 5.1. The project uses the default settings provided by Xcode when starting a new QuickLook Plugin project, and like I mentioned, it builds successfully. As far as I can tell, the compiled binary appears fine.
I set up to debug the program as advised in this question: Debugging Quicklook Plugin in Xcode 4.6. But when running the plugin, I get this output:
Testing Quick Look preview with files:
~/my-test-file.nc
2014-09-09 16:52:43.071 qlmanage[46315:303] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x8c27, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2014-09-09 16:52:43.074 qlmanage[46315:303] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x8f4b, name = 'com.apple.CFPasteboardClient'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2014-09-09 16:52:43.074 qlmanage[46315:303] Failed to allocate communication port for com.apple.CFPasteboardClient; this is likely due to sandbox restrictions
In addition, if I copy the .qlgenerator
file (compiled with Xcode 5.1) to ~/Library/QuickLook
, I can't get qlmanage
to pickup the new generator.
I have also found this question: QuickLook Plugin Failing with sandboxing error, which seem like it could be related. I read up a bit on how Apple's Sandboxing is supposed to work, but I can't figure out how to add entitlements to a QuickLook Plugin. I can't find the "Capabilities" panel mentioned in Apple's docs for adding entitlements.
EDIT: This also appears to be related: sandbox custom qlgenerator (Quick look) plugin.