Command CodeSign failed with a nonzero exit code

A few hours ago my app could be loaded , built and run without a problem. Now, after opening the app again with Xcode I get the message

Command CodeSign failed with a nonzero exit code

The app cannot be built. I don't know how to solve this problem. Please, can anyone help?

Best regards Gerhard

Answered by DTS Engineer in 789588022

Hey Gerhard,

I came across your question about the Xcode code signing failure error, and I found a helpful thread that might provide some answers:

https://forums.developer.apple.com/forums/thread/694298

Recommendations to Fix the Code Signing Issue:

  1. Summary of the thread recommends adopting automatic signing to resolve the problem. Here's how you can do it:

    a. Remove any extraneous code signing build settings.

    b. In the Signing & Capabilities section, enable "Automatically manage signing."

    c. Select your team from the Team popup.

    d. For the Signing Certificate, choose "Development."

  2. Verify Your Accounts and Certificates: It's essential to ensure that your development and distribution certificates in your accounts are up-to-date and do not have any errors.

Could you please provide me with some additional background information? It would be helpful to know:

  • The version of Xcode you are using.
  • The version of macOS you are running.
  • The complete error log from Xcode.
  • The type of app you are developing (iOS, macOS, visionOS, etc.).

Additional Tips:

  • Sometimes, a clean build and restart of Xcode can resolve the issue.
  • Check that your project's code signing settings are consistent with your team's configuration in the Apple Developer portal.

I'll be glad to assist you further if these suggestions don't work. Please let me know the results.

Hey Gerhard,

I came across your question about the Xcode code signing failure error, and I found a helpful thread that might provide some answers:

https://forums.developer.apple.com/forums/thread/694298

Recommendations to Fix the Code Signing Issue:

  1. Summary of the thread recommends adopting automatic signing to resolve the problem. Here's how you can do it:

    a. Remove any extraneous code signing build settings.

    b. In the Signing & Capabilities section, enable "Automatically manage signing."

    c. Select your team from the Team popup.

    d. For the Signing Certificate, choose "Development."

  2. Verify Your Accounts and Certificates: It's essential to ensure that your development and distribution certificates in your accounts are up-to-date and do not have any errors.

Could you please provide me with some additional background information? It would be helpful to know:

  • The version of Xcode you are using.
  • The version of macOS you are running.
  • The complete error log from Xcode.
  • The type of app you are developing (iOS, macOS, visionOS, etc.).

Additional Tips:

  • Sometimes, a clean build and restart of Xcode can resolve the issue.
  • Check that your project's code signing settings are consistent with your team's configuration in the Apple Developer portal.

I'll be glad to assist you further if these suggestions don't work. Please let me know the results.

Hello DTS Engineer,

I experienced Code Signing Issue a second time. It looks like everything was correct:

-> In the Signing & Capabilities section, "Automatically manage signing was enabled -> team was set correctly -> Signing Certificate, was "Development" was chosen

• I cancelled these settings and reset them again • I cleaned the build folder • I build again The error vanished.

As wanted, additional background information • Xcode 15.4 • macOS Sonoma 14.4.1 • type of app macOS

Thanks for your help Best regards, Gerhard

Command CodeSign failed with a nonzero exit code
 
 
Q