Spotlight on ADC Library

For some reason Apple hardwired Spotlight to ignore /Developer/ADC Reference Library/.  Why they don’t want developers to find documentation is beyond me.  Guess they don’t want us to write cool new software.  :-)

Fortunately, there’s a fairly painless way to get it working.  Here’s how thanks to Charles Srstka on the Cocoa Dev mailing list:

In the hidden /.Spotlight-V100 folder, there’s a file called _rules.plist. Editing it to look like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "
  http://www.apple.com/DTDs/PropertyList-1.0.dtd“>
<plist version=”1.0″>
<dict>
<key>EXCLUDE</key>
<array/>
<key>INCLUDE</key>
<array>
<string>/Developer/ADC Reference Library</string>
</array>
<key>NOTE</key>
<string>Specify paths to include or exclude, preceeding rules which
target user-homes with ~/</string>
</dict>
</plist>

and then running this command after rebooting:

mdimport /Developer/ADC\ Reference\ Library

should cause the developer docs to be searchable.

This worked for me.  I’m searching the docs in all their glory now.  Make sure you reboot after editing the plist file (killing the right process might work too, I’m too lazy to hunt it down, a 25 sec reboot is easier :-)).  I was going to quick in all of my excitement and missed that step.  I realized I missed it after hitting my head against the wall for a few minutes trying to figure out why it didn’t work.

Leave a Reply