Xcode 10, Command CodeSign failed with a nonzero exit code

后端 未结 30 2703
忘掉有多难
忘掉有多难 2020-12-02 05:49

Everytime I build console is showing this message.

CodeSign /Users/admin/Desktop/AppStoreBuild/Project201/build/Debug-iphonesimulator/Project.app (in

相关标签:
30条回答
  • 2020-12-02 06:15

    For me the solution was the following, having the "Automatically manage sign" flag on:

    1. in the team drop-down of the target, select "None"

    2. re-select the correct development team

    After trying almost every suggestion, I found that this works, I guess because Xcode sets up the signing stuff from scratch.

    0 讨论(0)
  • 2020-12-02 06:16

    I, too, saw this error after adding a mixture of .jpg and .png images to the art.scnassets folder, making code changes, and removing those changes via Xcode's Source Control > Discard All Changes... menu.

    I tried the other fixes in this thread but, ultimately, I had to delete the added .jpg/.png files, clean the project, and rebuild the project to eliminate the errors. I then readded the original .jpg/.png files and I'm now rebuilding the code without issue.

    0 讨论(0)
  • 2020-12-02 06:16

    After i copied two .aiff files in a .scnassets group, this error occured. Deletion of the files and a "Clean Build Folder" solves the problem in my case.

    0 讨论(0)
  • 2020-12-02 06:17

    I'm unsure of what causes this issue but one method I used to resolve the porblem successfully was to run pod update on my cocoa pods.

    The error (for me anyway) was showing a problem with one of the pods signing. Updating the pods resolved that signing issue.

    pod update [PODNAME] //For an individual pod
    

    or

    pod update //For all pods.
    

    Hopefully, this will help someone who is having the same "Command CodeSign failed with a nonzero exit code" error.

    0 讨论(0)
  • 2020-12-02 06:18

    This is because Code signing no longer allows any file in an app bundle to have an extended attribute containing a resource fork or Finder info.

    To see which files are causing this error, go to .app folder, normally is like: /Users/XXXX/Library/Developer/Xcode/DerivedData/MyProject-ckbzynxqjmstxigbdwwkcsozlego/Build/Products/Debug-maccatalyst/ (mine is Catalyst project) In Terminal,

    cd <above path>
    xattr -lr .
    

    You will see some files has extended attribute:

    ./MyProject.app/Contents/Resources/shopping_cart.png: com.apple.lastuseddate#PS: 00000000 BE 31 D5 5E 00 00 00 00 D0 40 FE 39 00 00 00 00 |.1.^.....@.9....|

    Then go to your project folder or referenced folder for those files, remove extended attribute:

    cd /Users/XXXX/Work/MyProject
    xattr -cr .
    

    After clean all referenced folders, go to Xcode and rebuild.

    0 讨论(0)
  • 2020-12-02 06:18

    Just a visualisation

    Lock Keychain "login" -> Unlock Keychain "login" -> Always allow
    

    0 讨论(0)
提交回复
热议问题