Xcode 8 can't archive “Command /usr/bin/codesign failed with exit code 1”

前端 未结 11 1798
不思量自难忘°
不思量自难忘° 2020-12-22 22:32

I\'ve got a serious problem on Xcode 8 on macOS Sierra. when I try to build my app, I get the following issue.

CodeSign /Users/me/Library/Developer/Xcode/Der         


        
11条回答
  •  执笔经年
    2020-12-22 23:14

    This gets caused by some resource files having extra attributes on the file system, probably caused by macOS Sierra (as I started having it after upgrading to macOS Sierra).

    Try executing xattr -c * on the whole DerivedData folder (as stated by the answer in https://forums.developer.apple.com/message/178039#178039):

    cd ~/Library/Developer/Xcode/DerivedData
    xattr -c *
    

    Removing attributes only on the build folder fixed the issue for me when debugging. Removing attributes on the whole DerivedData folder fixed it for me in archiving too. Please note that it may cause other consequences (albeit highly unlikely), but you can always delete the DerivedData folder and it will be regenerated, in case anything gets broken.

    Also, if it still fails, cleaning the project (not the build folder) after executing the command is a good idea.

提交回复
热议问题