IOS – XCode: code signing entitlement file in command line

code-signingcommand lineios

I would like to be able to build an IPA file with a given Entilements.plist file using command line. I can do pretty much anything, but I do not find a way to pass a code signing entitlements file using the command line (whereas I can do it in Xcode 7.3 UI). Any idea how to do that ?

Best Answer

I managed to have it working by calling:

xcodebuild ... CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO"

and then:

codesign --entitlements .../Entitlements.plist -s signing_identity