xcodebuild can't override provisioning profile if signing is managed automatically by Xcode

Originator:yakimant
Number:rdar://27784499 Date Originated:
Status:Duplicate of 27557191 Resolved:
Product:Xcode Product Version:8.0 (Build 8S188o)
Classification: Reproducible:Yes
 
Summary:
If I setup Xcode to manage signing automatically (General tab of project) - I can't override it in command line by adding PROVISIONING_PROFILE & CODE_SIGN_IDENTITY parameters.

Steps to Reproduce:
1. Check "Automatically manage signing" in General tab of Xcode project.
2. run the command line xcodebuild with PROVISIONING_PROFILE and CODE_SIGN_IDENTITY parameters added:
xcodebuild PROVISIONING_PROFILE='UUID' CODE_SIGN_IDENTITY='iPhone Developer: XXX' ... build

Expected Results:
** BUILD SUCCEEDED **

Actual Results:
(App Name) has conflicting provisioning settings. (App Name) is automatically signed, but provisioning profile Wildcard Enterprise Distribution Profile has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor, or switch to manual signing in the target editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.0'.

Version:
Xcode 8.0
Build version 8S188o

Comments

We are stopped from using Automatic signing because of this issue.


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!