Export archive for app-store distribution command: 'xcodebuild -exportArchive -archivePath ...' exited with non-zero exit-code: 70

Hi,

I have a project that integrates the Firebase SDK via SPM as a dependency of an internal Swift Package:

My app ⟶ My Library ⟶ Firebase SDK

The project builds successfully and can be archived locally ✅. The uploaded .ipa is valid and gets published 🚀.

However, we are now trying to automate the release process using Xcode Cloud, but the iOS Archive action is failing ❌ on Xcode Cloud.

The logs show the following error ⬇️:

error: exportArchive codesign command failed (/Volumes/workspace/tmp/XcodeDistPipeline/XcodeDistPipeline.~~~oomCvM/Root/Payload/base-ios.app/Frameworks/FirebaseAnalytics.framework: replacing existing signature

/Volumes/workspace/tmp/XcodeDistPipeline/XcodeDistPipeline.~~~oomCvM/Root/Payload/base-ios.app/Frameworks/FirebaseAnalytics.framework: invalid or corrupted code requirement(s)
Requirement syntax error(s):
line 1:178: unexpected token: <COMPANY_NAME>
)

** EXPORT FAILED **

I have been researching this issue for a while and have tried several solutions to fix it, but with no luck. Even though the error points to a specific library—the Firebase SDK—I don’t believe Firebase is the root cause. There were related issues in the past, but those were already fixed by the Firebase team, and as I mentioned, the project archives correctly when built locally.

On the other hand, the error states:

line 1:178: unexpected token: <COMPANY_ACRONYM>

This makes me wonder if there’s an issue parsing our Team Name during the re-signing process, as it contains special characters ":

"name": "Apple Distribution: Company Full Name "COMPANY_ACRONYM""

Answered by DTS Engineer in 824785022
Written by dregatos010 in 774129021
an issue parsing our Team Name … as it contains special characters "

That seems very likely.

I have two suggestions for you. First, file a bug against Xcode Cloud. It should be able to handle this, just like our local tools do.

Please post your bug number, just for the record.

Second, reach out to Apple Developer Program Support, via Apple > Developer > Contact Us, to see if they can remove the quotes from your team name. That’ll likely be the fastest way to get this working in the short term.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Written by dregatos010 in 774129021
an issue parsing our Team Name … as it contains special characters "

That seems very likely.

I have two suggestions for you. First, file a bug against Xcode Cloud. It should be able to handle this, just like our local tools do.

Please post your bug number, just for the record.

Second, reach out to Apple Developer Program Support, via Apple > Developer > Contact Us, to see if they can remove the quotes from your team name. That’ll likely be the fastest way to get this working in the short term.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Export archive for app-store distribution command: 'xcodebuild -exportArchive -archivePath ...' exited with non-zero exit-code: 70
 
 
Q