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""