Build setting variables are not expanded by the agvtool and thus it breaks when there is a variable in the INFOPLIST_FILE build setting.

Originator:benchatelain
Number:rdar://18500962 Date Originated:2014-09-30
Status:Open Resolved:
Product:Xcode (agvtool) Product Version:6.0.1 (6A317)
Classification:Other Bug Reproducible:Always
 
Summary:
Build setting variables are not expanded by the agvtool and thus it breaks when there is a variable in the INFOPLIST_FILE build setting.

Steps to Reproduce:
- Edit the INFOPLIST_FILE build setting for any target in an Xcode project
- Insert a valid build setting variable such as PROJECT_NAME like so:
     $(PROJECT_NAME)/Supporting Files/Info.plist
- Open Terminal and cd to the root folder of the project
- Execute the command: agvtool what-marketing-version

Expected Results:
The current CFBundleShortVersionString value should be output in quotes, like the “1.0” shown in the last line below.

    $ agvtool what-marketing-version                                                                                                                                                                                                                                                  
    No marketing version number (CFBundleShortVersionString) found for Jambase targets.

    Looking for marketing version in native targets...
    Looking for marketing version (CFBundleShortVersionString) in native targets...

    Found CFBundleShortVersionString of "1.0" in "it-policy-2014.xcodeproj/../it-policy-2014/Supporting Files/Info.plist"

Actual Results:
Instead, the actual contents of the INFOPLIST_FILE build setting is echoed, followed by a “Cannot find …” message.

    $ agvtool what-marketing-version                                                                                                                                                                                                                                                  
    No marketing version number (CFBundleShortVersionString) found for Jambase targets.

    Looking for marketing version in native targets...
    Looking for marketing version (CFBundleShortVersionString) in native targets...

    $(PROJECT_NAME)/Supporting Files/Info.plist
    Cannot find "$(PROJECT_NAME)/Supporting Files/Info.plist"

Regression:
This has been an issue for at least a couple years. I believe I first noticed it on Xcode 4.

Notes:
Adding the -terse flag suppresses the “Cannot find…” message and simply outputs the value of INFOPLIST_FILE
    $ agvtool what-marketing-version -terse
    $(PROJECT_NAME)/Supporting Files/Info.plist

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!