Re: Preprocessing info.plist files & UTTypeReferenceURL (Xcode bug?)
Re: Preprocessing info.plist files & UTTypeReferenceURL (Xcode bug?)
- Subject: Re: Preprocessing info.plist files & UTTypeReferenceURL (Xcode bug?)
- From: Eric Gorr <email@hidden>
- Date: Tue, 24 Jul 2007 10:33:34 -0400
On Jul 24, 2007, at 10:30 AM, Chris Espinosa wrote:
On Jul 24, 2007, at 7:19 AM, Eric Gorr wrote:
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
The preprocessor is seeing // as the beginning of a comment and
ignoring the rest of the line.
To avoid this, either set -traditional in the Other Plist
Preprocessor Flags or escape the slashes.
doh.
Thank you.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden