I wrote Spotlight Importer for the type of custom document that defines my application.
Everything works fine, metadata fields are correctly indexed by Spotlight (verified using the mdls ), and Spotlight search shows my documents.
The only problem that I encountered is that the elements specified in the <displayattrs> section of the <displayattrs> file schema.xml not appear in the "Additional Information" section when I request information about the file (Cmd + I'm in the Finder).
I expected these fields to appear there because I declared them in both the <allattrs> and <displayattrs> .
I found here a few questions related to this problem, but none of them helped me.
The importer enters the application downloaded by the system ( mdimport -L confirmed this). In addition, the package structure seems to be correct, schema.xml displayed in the Resources folder, as well as schema.strings in the en / lproj folder.
Here's what the schema.xml file looks like:
<schema version="1.0" xmlns="http://www.apple.com/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.apple.com/metadata file:///System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Resources/MetadataSchema.xsd"> <types> <type name="com.mydomain.myapp.mydocument"> <allattrs> kMDItemTitle kMDItemAuthors kMDItemAlbum </allattrs> <displayattrs> kMDItemTitle kMDItemAuthors kMDItemAlbum </displayattrs> </type> </types>
A few things, the mdcheckschema command is missing on my system, but the XML file is so short that I doubt the problem is with the syntax.
Sometimes in the "Additional Information" section the date of the last file opening is displayed, sometimes nothing.
Finally, I tried to rename the file ( mdimport ), but to no avail.
I am running Mac OS X Moutain Lion 10.8.3, Xcode 4.6.2.
So, here is my question, have I missed something to display these elements in the "Additional Information" section? Is there anyone who experienced such a problem and found a solution?
Edit :
No one has yet answered my question, maybe someone can point me to some textbook or documentation about this problem?