xcrun altool picking the wrong bundle id

I have 2 app store connect apps:

  • "<bundle-id>"
  • "<bundle-id>.beta"

This is necessary for our usecase as we are building an iOS blockchain wallet, for a chain that updates itself every ~3 months adding new features/changing. We need the communities input, and can't have them uninstalling/re-installing the production app constantly, having to re-import private keys, etc. So we use 1 app store connect app for production releases, and another for public facing long running beta, where we experiment with new features before pulling them into production. Allowing users to have both installed at the same time

Last week my CI (without any changes to scripts, project, profiles, etc), started failing for the production build with the error:

[altool.105176BE0] Validation failed (409) This bundle is invalid. The bundle identifier cannot be changed from the current value, '<bundle-id>.beta'. If you want to change your bundle identifier, you will need to create a new application in App Store Connect. (ID: ae60bab4-0c01-4b2e-9ea9-91a73adccc14)

Nowhere in any of the .app, .ipa, info.plist, provisioning profiles, etc, is it referencing "<bunlde-id>.beta", everything is referencing "<bundle-id>"

I tried building it manually locally, same error. I took the local output that failed with xcrun altool, and instead dropped it into Transporter, and it uploaded successfully to the production app

Is it possible that xcrun altool is using an app store connect API that changed sometime in the last few weeks? Maybe the search/sort ordering logic has changed?

Accepted Answer

Apple responded to my feedback ticket, this is a known Xcode 26 CLI issue. The logic was changed that if a parameter is not supplied, and the bundle id prefix matches another app, it will simply upload to whichever one was updated most recently.

It seems now you must supply

--apple-id <appleID>

when using altool. This is not referring to the apple id email, but rather the unique numeric identifier for your app when you open app store connect -> distribution - > app information -> apple id

This is SUPER confusing. Not sure why we can't use the "bundle id" parameter which already exists for altool, just being ignored in this context

Can you provide the FB number?

Thanks Albert Pascual
  Worldwide Developer Relations.

xcrun altool picking the wrong bundle id
 
 
Q