PROVISIONING_PROFILE_SPECIFIER not honoring team id

xcode 8 beta 2 PROVISIONING_PROFILE_SPECIFIER not honoring team id

In our automated build scripts we use xcodebuild to override build settings and especially code signing. The reason is that an app may be developed under one team and release (enterprise signed) under a different team id. The values for PROVISIONING_PROFILE_SPECIFIER (teamid/PRODUCT_BUNDLE_IDENTIFIER) , CODE_SIGN_IDENTITY and PRODUCT_BUNDLE_IDENTIFIER are all derived programmatically from the provisioning profile.


Here is an example of the xcodebuild command used:


/usr/bin/xcodebuild -verbose -project /Users/mobosxbuilder/bamboo-agent-home/xml-data/build-dir/TML-TI1T-JOB1/TDReaderX1/TDReaderX1.xcodeproj -configuration Release PROVISIONING_PROFILE_SPECIFIER=D47J8F9NFA/BCA_ToolboxMobileLibrary_Distro_2018 'CODE_SIGN_IDENTITY=iPhone Distribution: The Boeing Company' 'OTHER_CODE_SIGN_FLAGS=--keychain /Bamboo/Keychains/CAS_Distro_current.keychain' PRODUCT_BUNDLE_IDENTIFIER=com.boeing.cas.Toolbox-Mobile-Library

Build settings from command line:

CODE_SIGN_IDENTITY = iPhone Distribution: The Boeing Company

OTHER_CODE_SIGN_FLAGS = --keychain /Bamboo/Keychains/CAS_Distro_current.keychain

PRODUCT_BUNDLE_IDENTIFIER = com.boeing.cas.Toolbox-Mobile-Library

PROVISIONING_PROFILE_SPECIFIER = D47J8F9NFA/BCA_ToolboxMobileLibrary_Distro_2018


Returns:

Check dependencies

Signing for TML requires a development team. Select a development team in the Target Editor.

Code signing is required for product type 'Application' in SDK 'iOS 10.0'


From this it looks like in our case the PRODUCT_BUNDLE_IDENTIFIER team id is not being honored, we have also tried using only the team id followered by a "/" PROVISIONING_PROFILE_SPECIFIER=D47J8F9NFA/"


Is there a way to to overcome this issue without resortion to using the xcode GUI to set the development team in the Target Editor, which for us is not a viable option.

It appears that if the autosign is set in the target settings the xcodebuild command line options are ignored so the question is how do you disable the autosign from the command line?

xcconfig might be a way for you to override the configuration.

According to the WWDC 2016 talk on codesign changes, you are supposed to provide DEVELOPMENT_TEAM & PROVISIONING_PROFILE_SPECIFIER if you want to customize code signing. They said not to specify the identifier. You also don't want to specify the exact provisioning profile (uuid) since it can change. I do think the specifier is the way to go. So, based on your team id and the specifier, it's should figure out which provisioning profile to use automagically.


I think it can be done by having something like this in your .xcconfig file



//:configuration = Release
DEVELOPMENT_TEAM = XXX111AAA
PROVISIONING_PROFILE_SPECIFIER = My Release Provisioning Profile

//:completeSettings = none


I got these lines of text by configuring to what I'd like in Xcode and Ctrl-C on those items in the build settings screen. I guess those comments do mean something in .xcconfig context.

PROVISIONING_PROFILE_SPECIFIER not honoring team id
 
 
Q