Richard Stelling
Richard Stelling

Reputation: 25665

Xcode command line build fails with "Failed to read entitlements"

My Jenkins (continues integration server) is failing with the error:

error: Failed to read entitlements from '/var/folders/gp/fxfq69kd26j160s85g6vjy6h0000gr/T/yMWJTWS2AJ/Payload/app.com.app'

Full output:

The following build commands failed: CompileC /Users/jenkins/Library/Developer/Xcode/DerivedData/App-doozayqorsxatsbzlunnptqszxax/Build/Intermediates/rara.build/Production-iphoneos/rara.build/Objects-normal/armv7/RRArtworkView.o app/RRArtworkView.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure) Poduct build dir: /Users/jenkins/Library/Developer/Xcode/DerivedData/app-doozayqorsxatsbzlunnptqszxax/Build/Products/Production-iphoneos xcrun via /usr/bin/xcrun (xcrun) DEVELOPER_DIR = '/Developer' via '/usr/share/xcode-select/xcode_dir_path' Database Key is: PackageApplication_/Developer_iphoneos Cache version is '1' Lookup resolved in '/var/folders/gp/fxfq69kd26j160s85g6vjy6h0000gr/T/xcrun_db' : '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication' error: Failed to read entitlements from '/var/folders/gp/fxfq69kd26j160s85g6vjy6h0000gr/T/yMWJTWS2AJ/Payload/app.com.app' Build "app" failed Build step 'Execute shell' marked build as failure

It build fine form the IDE and will install on the device.

System info:

Upvotes: 4

Views: 4949

Answers (1)

Richard Stelling
Richard Stelling

Reputation: 25665

The rather cryptic message:

Failed to read entitlements[...]

Is cause by Xcode not archiving the app correctly, this is normally caused by:

  1. Having "Skip Install" set to NO
  2. Have header file (.h) copied to a public folder in the build phase

See the question:

Compile, Build or Archive problems with Xcode 4 (and dependancies)

For a detailed explanation of these issues.

Upvotes: 1

Related Questions