SDK 'macOS 10.12' 中的产品类型 'Command-line Tool' 需要代码签名

Code signing is required for product type 'Command-line Tool' in SDK 'macOS 10.12'

这是使用 Xcode 8.2 从命令行构建时的错误吗?

我在尝试构建时看到了这个 fbsimctl:

brew tap facebook/fb
brew install fbsimctl --HEAD

==> Installing fbsimctl from facebook/fb
==> Cloning https://github.com/facebook/FBSimulatorControl.git
Updating /Users/lnatan/Library/Caches/Homebrew/fbsimctl--git
==> Checking out branch master
==> ./build.sh fbsimctl build /usr/local/Cellar/fbsimctl/HEAD-244a622
Last 15 lines from /Users/lnatan/Library/Logs/Homebrew/fbsimctl/01.build.sh:
cd /tmp/fbsimctl-20170118-36571-pwc8nx/fbsimctl
/usr/bin/touch -c /tmp/fbsimctl-20170118-36571-pwc8nx/build/Build/Products/Debug/FBSimulatorControlKit.framework

=== BUILD TARGET fbsimctl OF PROJECT fbsimctl WITH CONFIGURATION Debug ≡

Check dependencies
"fbsimctl" isn't code signed but requires entitlements. It is not possible to add entitlements to a binary without signing it.
Code signing is required for product type 'Command-line Tool' in SDK 'macOS 10.12'

** BUILD FAILED **

The following build commands failed:
Check dependencies
(1 failure)

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/facebook/homebrew-fb/issues

尝试手动构建而不是使用脚本时,我遇到了类似的问题:

=== BUILD TARGET fbsimctl OF PROJECT fbsimctl WITH CONFIGURATION Release ===

Check dependencies
"fbsimctl" isn't code signed but requires entitlements. It is not possible to add entitlements to a binary without signing it.
Code signing is required for product type 'Command-line Tool' in SDK 'macOS 10.12'

** BUILD FAILED **


The following build commands failed:
    Check dependencies
(1 failure)

有趣的是,从 Xcode 构建成功。

您需要 运行 使用环境变量来禁用代码签名

export CODE_SIGNING_REQUIRED=NO && brew install fbsimctl --HEAD

来自安装说明。

这似乎已在最近的 fbsimctl 版本中得到解决。