Codesigning Syntax

Has the codesign syntax changed recently? I'm trying to sign an OSX app using the same syntax as I used successfully in August last year and terminal just responds with a guide on usage. I'm using 11.6.3

The syntax I'm using is

codesign -s 123456789 --options runtime --timestamp --force --deep --entitlements "pathtoobject"

Thanks!

Has the codesign syntax changed recently?

Yes, but that’s not what’s going on here [1].

The command you included is not right. Specifically, you’ve added the --entitlements option but not included a path to the entitlements file. If you want to sign with entitlements you need this:

codesign -s 123456789 --options runtime --timestamp --force --deep --entitlements /path/to/your.entitlements "pathtoobject"

If you don’t want to sign with entitlements, remove the --entitlements option completely.

Also, don’t include the --deep flag. --deep Considered Harmful explains why that’s a problem.

For further guidance on how to sign code manually, see Signing a Mac Product For Distribution.

Share and Enjoy

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

[1] The syntax for displaying code signatures changed in macOS 12, in that to get XML output you must now include the --xml flag.

Thanks Quinn. This works now of course.

Codesigning Syntax
 
 
Q