Xcode 11,Command CodeSign 失败,退出代码为非零

标签 xcode

自从(违背我的意愿)更新到 Xcode 11 后,当我尝试构建我的项目时,我收到了这个错误:

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

我已尝试清理我的项目、重置我的登录钥匙串(keychain)并重新启动我的计算机,但我仍然收到此错误...该怎么办?

我正在使用 OpenFrameworks 构建 OSX 应用程序,而不是 iOS 应用程序。当我在 Xcode 10.3 中构建它时,它工作正常,没有错误。

这个问题的独特之处在于,这是针对 Xcode 11,而不是 10,并且其他问题的答案都没有对我有用!

最佳答案

我通过以下方式解决了同样的问题:

  • 将 --deep 添加到“build设置”中的“其他代码签名标志”中。
  • 在目标的“Signing & Capabilities”中,单击左上角的“+ Capability”并选择“Hardened Runtime”。
  • 然后在列表中打开“禁用库验证”。

  • 我真的不知道使用此功能是否有任何缺点,但是我的应用程序可以在 macOS 和 iOS 上编译并正常工作。

    关于Xcode 11,Command CodeSign 失败,退出代码为非零,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58195914/

    相关文章:

    iphone - 重新配置动态库

    xcode - 动态设置表格 View 单元格行高?

    iphone - Xcode 4.x - 使其指向有问题的崩溃行

    java - 从 Xcode java 项目链接外部 .jar?

    xcode - NSDictionary 在调试中检查

    ios - 创建文字游戏

    ios - 将我的 cordova 项目转移到 Xcode

    ios - 适用于 iOS 12.0 的 Arm64e 架构

    xcode - 为较旧的 OS X 版本编译应用程序

    database - sqlite 数据库查询出现问题,不同的查询不起作用