Why does publishing to App Store Connect fail with a 500 error or "Cannot determine Apple ID" message?
Last updated: September 16, 2026
Context
When building an iOS app with Codemagic, the build and export steps may complete successfully, but publishing to App Store Connect fails. The publishing log may show an error such as:
App Store Connect API returning a
500 Internal Server ErrorCannot determine the Apple ID from Bundle ID '...' and platform 'IOS'
This typically occurs during the Publishing step when Codemagic attempts to upload the IPA to App Store Connect.
Answer
This error is commonly caused by missing required app icon definitions or missing supported interface orientations in your iOS project configuration. App Store Connect rejects the upload when these required fields are absent. Follow the steps below to resolve the issue:
Add supported interface orientations to
Info.plist. Open your project'sInfo.plistfile and add the following keys:<key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> <key>UISupportedInterfaceOrientations~ipad</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array>Add the
CFBundleIconNamekey toInfo.plistto link the bundle to your asset catalog icon set:<key>CFBundleIconName</key> <string>AppIcon</string>Add the required app icon PNG files to your asset catalog. Navigate to
Assets.xcassets/AppIcon.appiconset/and ensure valid PNG images are assigned for all required sizes:iPhone: 120×120 pixels
iPad: 152×152 pixels
App Store: 1024×1024 pixels
Commit your changes and re-trigger the build in Codemagic.
After completing these steps, Codemagic should be able to successfully publish your app to App Store Connect.