Workaround for Xcode Not Noticing new Build Settings in Info.plist Preprocessing
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