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: "Isaac Wankerl" <email@hidden>
- Date: Tue, 24 Jul 2007 10:36:06 -0500
On 7/24/07, Eric Gorr <email@hidden> wrote:
Well, almost got it working...
> 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.
When I added -traditional to Other Plist Preprocessor Flags, I get an
error:
error: couldn't parse contents of 'Preprocessed-Info.plist': XML
parser error:
Unexpected character # at line 6
Old-style plist parser error:
Unexpected character '0x23' at line 6
It appears to be because I am using things like #define in the
preprocessor prefix file, so -traditional does not appear to be a
solution in my case.
So, I attempted to escape the slashes
INFOPLIST_PREPROCESSOR_DEFINITIONS = MY_COMPANY_URL="http:\/
\/www.mycompany.com"
But, I ended up with the same result...the processor saw a comment
and cut off the rest.
If I place
<key>UTTypeReferenceURL</key>
<string>http:\/\/www.mycompany.com</string>
directly in the info.plist before the preprocessing, I get
<key>UTTypeReferenceURL</key>
<string>http:\/\/www.mycompany.com</string>
in the final result. I am not sure if that would be a valid result -
the slashes remain escaped.
I ran into this the other day and adding -traditional did not help.
Here is how I dealt with the issue. I escape the first slash of the
URL:
<key>SUFeedURL</key>
<string>http://www.foo.com/</string>
Isaac
_______________________________________________
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