To my applications info.plist, I need to add the UTExportedTypeDeclarations section.
For the type declarations, I would like to have the UTTypeReferenceURL tag.
However, if I have
<key>UTTypeReferenceURL</key>
<string>http://www.mycompany.com</string>
in the info.plist before the preprocessing, the final info.plist file contains
<key>UTTypeReferenceURL</key>
<string>http:
which is, of course, invalid.
In the Xcode documentation there is a section (Preprocessing Info.plist Files) which talks about this functionality. In there it states that one can use INFOPLIST_PREPROCESSOR_DEFINITIONS to define some substitutions.
So, I attempted
INFOPLIST_PREPROCESSOR_DEFINITIONS = MY_COMPANY_URL="http://www.mycompany.com"
and in the info.plist
<key>UTTypeReferenceURL</key>
<string> MY_COMPANY_URL </string>
However, this did not work. I did end up with a valid plist, but the result was:
<key>UTTypeReferenceURL</key>
<string>http:</string>
Instead of the colon or forward slashes, I've tried using : and /, but the end result was the same.
This would appear to be a bug, but I wanted to check here first in case I missed something and in case there is a workaround for this problem.
If it matters, I am using Xcode 2.4.1.
If you want to know why I want a UTExportedTypeDeclarations section in my Applications info.plist file, please refer to this message:
http://lists.apple.com/archives/Spotlight-dev/2007/Jul/msg00018.html