• 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: Add variable from script during build
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add variable from script during build


  • Subject: Re: Add variable from script during build
  • From: Trygve Inda <email@hidden>
  • Date: Sat, 21 Mar 2009 05:51:39 +0000
  • Thread-topic: Add variable from script during build

>
> On Mar 20, 2009, at 6:19 PM, Trygve Inda wrote:
>
>> I have a two target app.
>>
>> During the build of target A, I need to run a shell script which
>> will return
>> a text result. This result needs to be inserted in the Info.plist of
>> target
>> B.
>>
>> So how can my shell script set something like ${MY_VAR} and then in
>> target
>> B's Info.plist I can have:
>>
>> <key>MyKey</key><string>${MY_VAR}</string>
>>
>> Possible?
>>
>> Thanks,
>>
>> Trygve
>
> - Have target A's script write a .h file that contains only "#define
> MY_VAR <value>" into a known place, usually $DERIVED_SOURCES_DIR.
> - Add "#include $(DERIVED_SOURCES_DIR)/MyVar.h"  to the Info.plist
> file.  This means you have to edit as text from then on; the plist
> editor won't work with C constructs.
> - Alter the key/value pair in the plist to be <key>MyKey</
> key><string>MY_VAR</string>

> - Turn on Preprocessing for the Info.plist.  Be sure to add -
> traditional-cpp to the Other Plist Preprocessor Flags.

When do I turn on these settings? There doesn't seem to be anything in the
File Types Preferences that will do this.

Thank you,

Trygve


 _______________________________________________
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: Add variable from script during build
      • From: Andrew Pontious <email@hidden>
References: 
 >Re: Add variable from script during build (From: Chris Espinosa <email@hidden>)

  • Prev by Date: Re: Add variable from script during build
  • Next by Date: Subversion 1.5/1.6 and Xcode 3+ HOWTO
  • Previous by thread: Re: Add variable from script during build
  • Next by thread: Re: Add variable from script during build
  • Index(es):
    • Date
    • Thread