Can Xcode write the selected Development Team in user rather than project data?

Xcode 8 insists that you select a Development Team before you can build any code that needs signing. It writes that selection to the .pbxproj file using an alphanumeric code to identify the team you have selected. This can be hugely annoying when the .pbxproj file is under version control. Is there a way to tell Xcode to write the selection in user data (e.g. in the xcuserdata folder) instead?


While I'm on this subjecdt, is there a programmatic way to find out the alphanumeric code for one's development team? At the moment to find it I look in the .pbxproj file after making the selection.


Doubtless somebody will say I should just make sure everyone working on the project is in the same team. I can't because this is OSS and I am using a "personal team." Other users of this OSS package also will likely have their own personal teams. The software in question is a test suite for a utility library and so there is no need to ever distribute it as an app. The library will be included in their apps by developers who will then sign those apps for distribution. Developers may want to build and run the test suite on their own devices.

> While I'm on this subject, is there a programmatic way to find out the alphanumeric code for one's development team? At the moment to find it I look in the .pbxproj file after making the selection.


You can find this code by the following

  • Open Keychain Access (it's in /Applications/Utilities)
  • Select *login* in top left pane
  • Select *My Certificates* in bottom left pane
  • Right click the certificate of the team you wish to use; choose *Get Info* from the context menu.
  • Click the triangle beside *Details* to expand it, if not already expanded
  • The code is the value of the *Organizational Unit* field under *Subject Name*


I am still looking for an answer to my main question.

You can


security find-identity -p codesigning -v


gives you the various certificates you can use. Pick one, then run


security find-certificate -c (the one you picked) -p | openssl x509 -subject


the organizational unit is next to OU=

Can Xcode write the selected Development Team in user rather than project data?
 
 
Q