On Xcode16, when using the xcodebuild command to package, the developer account will be logged out, and then the packaging will fail.

Our CI process uses XcodeBuild tools. It used to work very well. The shell code is as follows:

step 1 "++++++++++++++++clean++++++++++++++++"
xcodebuild clean -workspace ${WORKSPACE_NAME}.xcworkspace \
                 -scheme ${SCHEME_NAME} \
                 -configuration ${configuration}
                 
step 2  "+++++++++++++++++archive+++++++++++++++++"
xcodebuild archive -workspace ${WORKSPACE_NAME}.xcworkspace \
                   -scheme ${SCHEME_NAME} \
                   -configuration ${configuration} \
                   -archivePath ${ARCHIVE_PATH}
                   -allowProvisioningUpdates YES
                  

step 3 "+++++++++++++++++ipa+++++++++++++++++"
xcodebuild -exportArchive \
           -archivePath ${ARCHIVE_PATH} \
           -exportPath "${IPA_PATH}" \
           -exportOptionsPlist ${EXPORT_METHOD_PLIST_PATH} \
           -allowProvisioningUpdates YES

But after upgrading to xcode16, every time I execute the step3, it fails. The error log is like this

** ARCHIVE SUCCEEDED **

2024-11-08 16:19:54.360 xcodebuild[36487:6743710] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path "/var/folders/ch/1mvd9gz11cn8zy9h254qz2600000gn/T/***.xcdistributionlogs".
error: exportArchive No Accounts

error: exportArchive Provisioning profile "iOS Team Store Provisioning Profile: com.***" doesn't include signing certificate "Apple Distribution: *** Co Ltd (***)".

** EXPORT FAILED **

At this time, my Apple developer account disappeared in xcode-setting-account, and it automatically logged out. If I log in again and execute the shell command, the above phenomenon will reappear. What is the cause of this, and what do I need to do to solve this problem? I look forward to your reply

@DTS Engineer I use automatic signing, and I have logged into my developer account in Xcode, and I have added the parameter -allowProvisioningUpdates YES to the package command. This used to work fine, but now this problem has occurred. Should I switch to manual signing?

On Xcode16, when using the xcodebuild command to package, the developer account will be logged out, and then the packaging will fail.
 
 
Q