• 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
Workaround for Xcode Not Noticing new Build Settings in Info.plist Preprocessing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Workaround for Xcode Not Noticing new Build Settings in Info.plist Preprocessing


  • Subject: Workaround for Xcode Not Noticing new Build Settings in Info.plist Preprocessing
  • From: Jerry Krinock <email@hidden>
  • Date: Mon, 3 Jan 2011 17:26:48 -0800

I should have thought of this a long time ago, but since we've discussed this here before and never got a good solution, I just realized that there is an easy workaround for Apple Bug 24954, Duplicate/4505141 in Xcode, which is that Xcode does not check for changed Build Settings that are referenced in Info.plist when it decides whether or not to preprocess and produce a new Info.plist file.  Therefore, for example, if you are using the placeholder ${CURRENT_PROJECT_VERSION} in your Info.plist, and you change your CURRENT_PROJECT_VERSION Build Setting and then rebuild, the version number in the new product's Info.plist will still be the prior version.

The workaround is to add a Run Script Build Phase.  The script's text is one line of bash…

   touch "$INFOPLIST_FILE"

Add this Build Phase before the Copy Files Build Phase, in any Target that has an Info.plist.  Xcode will now preprocess and produce a new Info.plist file (which takes a few milliseconds) with each and every build.

 _______________________________________________
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: Workaround for Xcode Not Noticing new Build Settings in Info.plist Preprocessing
      • From: Jerry Krinock <email@hidden>
  • Prev by Date: Re: XCode: Still Not Able To Code Sign
  • Next by Date: no SubSystem declaration error
  • Previous by thread: Re: Xcode crashes on iPhone4 restore
  • Next by thread: Re: Workaround for Xcode Not Noticing new Build Settings in Info.plist Preprocessing
  • Index(es):
    • Date
    • Thread