Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 11, Command CodeSign failed with a nonzero exit code

Tags:

xcode

Ever since updating (against my will) to Xcode 11, I'm getting this error when I try to build my project:

CodeSign /Volumes/HDD/OpenFrameworks/of_v0.9.8_osx_release/apps/plus-pool-light/pplight-ofx-098/bin/pplight-ofx-098Debug.app (in target 'pplight-ofx-098' from project 'pplight-ofx-098')
cd /Volumes/HDD/OpenFrameworks/of_v0.9.8_osx_release/apps/plus-pool-light/pplight-ofx-098
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate

Signing Identity:     "-"


 /usr/bin/codesign --force --sign - --entitlements /Volumes/HDD/OpenFrameworks/of_v0.9.8_osx_release/apps/plus-pool-light/pplight-ofx-098/build/pplight-ofx-098.build/Debug/pplight-ofx-098.build/pplight-ofx-098Debug.app.xcent --timestamp=none /Volumes/HDD/OpenFrameworks/of_v0.9.8_osx_release/apps/plus-pool-light/pplight-ofx-098/bin/pplight-ofx-098Debug.app

/Volumes/HDD/OpenFrameworks/of_v0.9.8_osx_release/apps/plus-pool-light/pplight-ofx-098/bin/pplight-ofx-098Debug.app: code object is not signed at all
In subcomponent: /Volumes/HDD/OpenFrameworks/of_v0.9.8_osx_release/apps/plus-pool-light/pplight-ofx-098/bin/pplight-ofx-098Debug.app/Contents/Frameworks/GLUT.framework
Command CodeSign failed with a nonzero exit code

I've tried cleaning my project, resetting my login keychain, and restarting my computer, but I still get this error... what to do?

I am building an OSX App using OpenFrameworks, not an iOS App. When I build it in Xcode 10.3 works fine with no errors.

The parts of this question that are unique is that this is for Xcode 11, not 10, and none of the answers for that other question worked for me!

like image 230
JackKalish Avatar asked Oct 02 '19 05:10

JackKalish


Video Answer


2 Answers

You can get this error if you have added a folder to your project as a 'folder reference' (the project will have a blue folder logo in Xcode)

  • Remove the folder (Trash)
  • Add folder and select 'Create Groups' instead of 'Folder Reference' at the dialog Add Folder Dialog
like image 155
Akindele Oluwakamiye Avatar answered Oct 03 '22 10:10

Akindele Oluwakamiye


I had the same issue for all my Carthage Frameworks, the solution is:

Under Target-> [AppName] -> General -> "Frameworks, Libraries and Embedded Content"

Select "Do Not Embed" for the option next to the problematic framework.

More info are in this thread

NOTE: this might not fully solved the issue, never forget to try clean the project, restart Xcode even restart Mac sometimes.

like image 34
William Hu Avatar answered Oct 03 '22 11:10

William Hu