Xcode Archive Failure: Code Signing Error with Hermes Framework

Hello fellow developers,

I've encountered a code signing issue during the archiving process in Xcode and I'm looking for some guidance. Here's the error message I received:

codesign command failed (/var/folders/44/968_7v_972vb03blw9l1_sqr0000gn/T/XcodeDistPipeline.~~~k4kX6H/Root/Payload/SweetifyCrm.app/Frameworks/hermes.framework: replacing existing signature /var/folders/44/968_7v_972vb03blw9l1_sqr0000gn/T/XcodeDistPipeline.~~~k4kX6H/Root/Payload/SweetifyCrm.app/Frameworks/hermes.framework: invalid or corrupted code requirement(s) Requirement syntax error(s): line 1:140: unexpected token: SWEETIFY )

Here's what I've tried so far:

Cleaned the build folder and rebuilt the archive. Ensured that the correct signing certificate and provisioning profile are in use. Checked .entitlements file for any syntax errors or misplaced tokens. Searched for the token "SWEETIFY" in my project, which is part of the development team name, but didn't find any irregularities. This error seems to be triggered when codesign is executed during the archiving process, specifically with the Hermes framework which is part of my React Native project.

I'm using Xcode version 15.0.1, and my project includes Hermes as a JavaScript engine. The issue arises when I try to archive the app for distribution. The word "SWEETIFY" appears to be causing trouble, but it's merely part of the development team's name, (LLC "SWEETIFY").

Has anyone faced a similar issue or could offer some insight into what might be going wrong here? Any help or suggestions would be greatly appreciated!

Thank you in advance for your time and help.

  • Hello!

    Most likely your distribution certificate has expired. Check its validity.

    I had a similar issue, and it was related to this.

Add a Comment

Replies

So, to be clear, your team name is LLC "SWEETIFY", including the double quotes?

For context, this error seems to be coming out of the code signing machinery that sets up code signing designated requirement. See TN3127 Inside Code Signing: Requirements for more on that. Xcode’s default DRs don’t usually reference the team name. Once you confirm the above, we can take a look at why that’s not happening here.

Also, what platform are you targeting here?

Share and Enjoy

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

Error log invoking codesign: <NSConcreteTask: 0x60000c29cbe0; launchPath='/usr/bin/codesign', arguments='( "-f", "-s", "-", "--signature-size", 16000, "--entitlements", "/var/folders/44/968_7v_972vb03blw9l1_sqr0000gn/T/XcodeDistPipeline.~~~zdt7pj/entitlements~~~k4xg2T", "--requirements", "=designated => anchor apple generic and identifier "dev.hermesengine.iphoneos" and certificate leaf[subject.CN] = "Apple Distribution: LLC "SWEETIFY" (V9X2FBB5RV)" and certificate 1[field code] /* exists */", "--preserve-metadata=identifier,flags,runtime", "--omit-adhoc-flag", "--team-identifier", ************, "--generate-entitlement-der", "-vvv", "/var/folders/44/968_7v_972vb03blw9l1_sqr0000gn/T/XcodeDistPipeline.~~~zdt7pj/Root/Payload/SweetifyCrm.app/Frameworks/hermes.framework" )'>

The error was related to the certificate, or rather its name, removing the quotes solved the problem