Entitlements file isn't preprocessed correctly with settings from the command-line
| Originator: | kelan | ||
| Number: | rdar://32495711 | Date Originated: | May 31, 2017 |
| Status: | open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 8.3.2 |
| Classification: | bug | Reproducible: | always |
Summary: When preprocessing an entitlements file during a build, it doesn't respect values passed on the commandline to xcodebuild. Steps to Reproduce: 1) Put a pre-processed value in the `my-app.entitlements` file for my app. For example: ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.security.application-groups</key> <array> <string>$(MY_APP_GROUP)</string> </array> </dict> </plist> ``` 2) Build from the command-line, using `xcodebuild`, passing a value for `MY_APP_GROUP` as an argument. ``` $ xcodebuild -scheme MyApp -configuration release build MY_APP_GROUP=my-container-value` ``` Expected Results: The value from the command-line should be filled in to the entitlements file during the pre-processing phase. Observed Results: It's not filled in. If there is a value for MY_APP_GROUP set elsewhere in the build settings (e.g. in the Xcode gui, or a xcconfig file), then that value is used. But the value from the command-line arg should take higher priority, but it doesn't. This used to work correctly in Xcode 8.2. Version: Xcode 8.3.2 Build version 8E2002 macOS Sierra 10.12.5 (16F73)
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!