0

I execute the following xcodebuild command line:

xcodebuild CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO 
 -workspace "MyThing.xcworkspace" -scheme "MyScheme" 
 -configuration 'Debug' -sdk iphoneos clean build

and get this error:

error: An empty identity is not valid when signing a binary
 for the product type 'Application'. (in target 'MyTarget')

This used to work. How can I fix it?

This is using Xcode 10.2.1.

Clay Bridges
  • 11,602
  • 10
  • 68
  • 118

1 Answers1

2

For whatever reason, this seems to be (yet another) strange side effect of using Xcode's new build system. You can fix this from the xcodebuild command line by forcing use of the legacy build system, using the following flag:

-UseModernBuildSystem=0

To set up your project/workspace to use the legacy build system for everything, see here.


NOTE: While one can apparently still use it for a bit longer (in June 2022), the legacy build system is marked deprecated in Xcode 13.4.1)

Clay Bridges
  • 11,602
  • 10
  • 68
  • 118