Preprocessing Info.plist : xcconfig Build Setting doesn't propagate
Preprocessing Info.plist : xcconfig Build Setting doesn't propagate
- Subject: Preprocessing Info.plist : xcconfig Build Setting doesn't propagate
- From: Jerry Krinock <email@hidden>
- Date: Sat, 03 Nov 2012 06:47:56 -0700
STEPS TO REPRODUCE:
1. Switch on Info.plist Preprocessing in a Mac app project.
2. Use the variable ${CURRENT_PROJECT_VERSION} as needed in Info.plist (value for keys Bundle Version, Short Bundle Version, Get Info String).
3. Build the project and verify that Info.plist preprocessing is working.
4. Add an xcconfig file to the project.
5. In the xcconfig file, add this line:
CURRENT_PROJECT_VERSION = 1.12.6
6. Build. Once, twice, or six times.
EXPECTED RESULT:
Info.plist in product should indicate the new CURRENT_PROJECT_VERSION.
ACTUAL RESULT:
Still indicates the old value.
PARTIAL WORKAROUND:
Add a Run Script Build Phase containing this command:
touch "$INFOPLIST_FILE"
RESULT:
Now, the new CURRENT_PROJECT_VERSION appears in the produced Info.plist, but only after you've built TWICE. This is repeatable. Whenever you change the value of CURRENT_PROJECT_VERSION in the xcconfig file, it always takes two builds before Info.plist gets re-preprocessed.
* * *
So I reported this as Bug ID 12630908.
In practice, the two-build requirement with the workaround is not usually a problem, since I always build at least twice between shipping updates :) But can anyone guess why it doesn't work on the first 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