• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Info.plist preprocessing with <integer> values
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Info.plist preprocessing with <integer> values


  • Subject: Re: Info.plist preprocessing with <integer> values
  • From: "Isaac Wankerl" <email@hidden>
  • Date: Tue, 6 Mar 2007 17:10:48 -0600

On 3/6/07, B.J. Buchalter <email@hidden> wrote:
The preprocessor replaces the token -- is is not variable replacement.

So change it to

    <key>Foo</key>    <integer>FooValue</integer>

And it will work correctly.

The string is not correct anyway, since the string would have been

    <key>Foo</key>    <string>${2}</string>

after preprocessing, which is not what you wanted...

On 3/6/07 4:55 PM, "Isaac Wankerl" <email@hidden> wrote:

> I'm trying to have my Info.plist file preprocessed.  I want my final
> output to be
>
>     <key>Foo</key>    <integer>2</integer>
>
> I have things set up so that my xcconfig file has
>
>     FooValue = 2
>
> And the Info.plist has
>
>     <key>Foo</key>    <integer>${FooValue}</integer>
>
> but this gives me a build error.
>
> error: couldn't parse contents of
> '...path.../Preprocessed-Info.plist': XML parser error:
> Unknown character '$' (0x24) in <integer> on line 28
> Old-style plist parser error:
> Malformed data byte group at line 3; invalid hex
>
>
> If I change the plist to
>
>     <key>Foo</key>    <string>${FooValue}</string>
>
> everything is fine, but I would rather use <integer>.  Is it possible
> to do that?
>
> Thanks,
> Isaac

Are you sure about that? I just did a build with

   <key>Foo</key>    <integer>FooValue</integer>

and it failed.  If I change it to <string>FooValue</string>, the
resulting Info.plist has the string "FooValue" in it, not its value of
2.

Ah, I see now.  If I use the C preprocessor I can "#define FooValue 2"
which gets this to work.  In my case I was setting up a build setting
in the .xcconfig file and using that with ${FooValue} doesn't work.

Thanks,
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


  • Follow-Ups:
    • Re: Info.plist preprocessing with <integer> values
      • From: "Shawn Erickson" <email@hidden>
References: 
 >Info.plist preprocessing with <integer> values (From: "Isaac Wankerl" <email@hidden>)
 >Re: Info.plist preprocessing with <integer> values (From: "B.J. Buchalter" <email@hidden>)

  • Prev by Date: Re: Preprocessor corrupts plist files
  • Next by Date: [OT] Disk image creation
  • Previous by thread: Re: Info.plist preprocessing with <integer> values
  • Next by thread: Re: Info.plist preprocessing with <integer> values
  • Index(es):
    • Date
    • Thread