Search code examples
xcodebuildmacos-sierraxcode8.2

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


Is this a bug when building from command-line with Xcode 8.2?

I'm seeing this when trying to build 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

Trying to build manually instead of using the script, I get a similar issue:

=== 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)

Interestingly, building from Xcode succeeds.


Solution

  • This seems to have been solved in recent fbsimctl releases.