Exporting entitlements.plist from the app using the codesign utility gives warning

Export entitlements.plist from the app using the codesign utility

codesign -d --entitlements :entitlements.plist /path/to/.app/

Using above mentioned command doing signing of iOS application but during command run getting warning as below

Warning: Specifying ':' in the path is deprecated and will not work in a future release

Instead using ":" which argument to use to not see above mentioned warning

XCode version used : 13.2

Replies

This was a deliberate change brought about by the switch to DER entitlements [1]. You now have two choices. To export a textual representation of the DER entitlements, just leave off the colon:

% codesign -d --entitlements - …

To export in the legacy XML format, specify the --xml flag:

% codesign -d --entitlements - --xml …

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] If you’re curious, see The future is DER in TN3125 Inside Code Signing: Provisioning Profiles and Special slots in TN3126 Inside Code Signing: Hashes.

**Hello,

command we are using here

codesign -d --entitlements :entitlements.plist /path/to/.app/

when ":" is removed and command used as

codesign -d --entitlements - entitlements.plist /path/to/.app/ or codesign -d --entitlements - --xml entitlements.plist /path/to/.app/

It raises error as Entitlements.plist: No such file or directory

Please suggest argument that should be passed here**

You tried two commands. The first one:

codesign -d --entitlements - entitlements.plist /path/to/.app/

fails because you’re specifying both - and entitlements.plist. The argument after --entitlements tell it where to write the result. A value of - means stdout. You can’t then supply a second value of entitlements.plist.

The second one:

codesign -d --entitlements - --xml entitlements.plist /path/to/.app/

fails for similar reasons, although in this case you’ve also inserted an independent option, --xml, between --entitlements and its argument.

I recommend that you have a read through the codesign man page. Also, the above is pretty standard Unix command line stuff. If that’s foreign to you, you might want to look for a tutorial on the Unix shell. If you enter unix shell tutorial into your search engine of choice, it’ll bring up a bunch of good options.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"