xcodebuild should use App Store Connect API Key for uploading to App Store with -exportOptionsPlist destination as upload

Feature Suggestion

Allow “manageAppVersionAndBuildNumber” and “upload” in "-exportOptionsPlist" to use the App Store Connect API Key information passed in through “-authenticationKeyPath”, “-authenticationKeyID”, and “-authenticationIssuerID” so having a logged in Apple ID through Xcode is not required

Motivation

I'm trying to use the xcodebuild CLI tool to upload to the App Store with the "upload" value for "destination" in the "-exportOptionsPlist". Historically the only authentication method has been Apple ID.

Xcode 15 adds support for the App Store Connect API Key. This API Key is used for -allowProvisioningUpdates but it isn't working for the "upload" destination.

The reason I am trying and hoping to use upload to the App Store with xcodebuild is because I want to make use of the new ability to manage version number and build numbers. This is done by adding the “manageAppVersionAndBuildNumber” in the “-exportOptionsPlist”.

This does work, however, the “manageAppVersionAndBuildNumber” and “upload” only work with the Apple ID that is signed into Xcode through the preferences. Getting and updating the app version and build number and uploading the binary are all possible to do with the App Store Connect API Key in other tools.

I forgot to add this in the description but I think this would be a great addition to the xcodebuild CLI tool so that it matches the UI functionality of Xcode 13 with managing app version and build number but directly through the CLI and solely with the App Store Connect API Key 😊

Oh, this is also filed as feedback under FB9145847

also filed as feedback under FB9145847 — Thanks!

xcodebuild should use App Store Connect API Key for uploading to App Store with -exportOptionsPlist destination as upload
 
 
Q