Debugging Spotlight importers
(I don't have a full post about this yet, but I wanted to write this down somewhere)
A while back I was taking some time to get a Spotlight importer working, and I ran across a tool that really helped me figure out what wasn't working. With all of the various settings you have to get right, you're bound to miss one (well, I am, anyway)
There's a great tool for debugging in the LaunchServices framework - which lets you see if your application and importer are dealing with the same things.
Here's what I use:
(split so it will look better on the blog page)
/System/Library/Frameworks/ApplicationServices.framework/
Frameworks/LaunchServices.framework/Support/lsregister -dump | grep myAppName
The 'lsregister' command has lots of different options, and the -dump argument makes it dump the entire database out in text. There's a lot of stuff there, so I either grep for what I'm looking for or do a standard find while going through the text.
Of course, make sure you check out the Apple pages - Spotlight Importer Programming Guide - which has lots of good info as well.
More things as I run into them...
0 Comments:
Post a Comment
<< Home