I'm reading Apple's Configuration Profile Reference, https://developer.apple.com/business/documentation/Configuration-Profile-Reference.pdf, and on page 65 it is stated that the CodeRequirement
identity dictionary key should be a string obtained via the command codesign -display -r -
:
However, I'm not able to pass these options to my codesign
command-line app. codesign -d
works, but just returns the path of the executable:
/Applications> codesign -d Slack.app
Executable=/Applications/Slack.app/Contents/MacOS/Slack
However, codesign -d -r
doesn't work:
/Applications> codesign -d -r Slack.app
Usage: codesign -s identity [-fv*] [-o flags] [-r reqs] [-i ident] path ... # sign
codesign -v [-v*] [-R=<req string>|-R <req file path>] path|[+]pid ... # verify
codesign -d [options] path ... # display contents
codesign -h pid ... # display hosting paths
How do I get the CodeRequirement
for an app using the codesign
command-line tool?