Reputation: 325
I've written a quick look plugin to preview my custom file type, but it doesn't work when embedded in my OS X app bundle. Running "qlmanage -m plugins" doesn't show my UTI
Manually copying the qlgenerator file from myApp.app/Contents/Library/QuickLook/ to /Library/QuickLook/ and running "qlmanage -r" makes the quicklook preview work.
Do you have to do something special in the hosting app to register the embedded quick look plugin with OS X?
Extra notes: (I don't know why these would matter since the qlGenerator works when I manually copy it, but maybe this information will help)
During build, I get this warning about the qlGenerator: "warning: skipping copy phase strip, binary is code signed"
The copy build phase is set up like so:
Upvotes: 0
Views: 1002
Reputation: 325
I got it working, but there wasn't a straightforward solution. A couple things I did:
I didn't have the exported UTIs set up properly for my application. I looked at the plist of some other applications to see how they did it to fix this.
I had lots of copies of my app all over my system. They all mentioned the same UTI, so there is a possibility that these were confusing quick look. I deleted them all.
I disabled code signing on the quick look target. This fixed the warning I was getting. The ql plugin gets code signed by the application it gets bundled into.
I sent my application to other computer's /Applications/ folder and tested there. Seems like the quick look daemon wouldn't clear it's cache for application-embedded quick look plugins. I may have lost it a little, but it seemed like there might have been something special about dragging the application to /Applications/ and launching it from there that would kick start the quick look daemon.
Some combination of these things caused it to start working. (Un)Happy coding :(
Upvotes: 3