Sandboxed apps have to declare their entitlements. Of course, that doesn't do me any good if I can't tell what entitlements it declares. A text editor that has entitlements for Core Location, Network Server, and my Address Book, without my knowledge, could be much worse than an unsandboxed app.

How can I see what entitlements an app has?


After some more searching, I found a command-line answer:

codesign -d --entitlements :- /Applications/Whatever.app/

This will print out an XML plist with values like:


For more information see https://developer.apple.com/library/archive/qa/qa1798/_index.html#//apple_ref/doc/uid/DTS40014167-CH1-IOS_STEPS

If anyone knows an easier/nicer way, though, I'd love to hear it.

  • 2
    Also more documentation about that: developer.apple.com/library/content/documentation/Security/… – user202579 May 15 '18 at 9:42
  • On Mojave 10.14.4, the command above prints an extra 8 bytes at the start: fade7171000000fb, making the XML invalid. Any way to avoid that or strip it away? – luckman212 Apr 22 '19 at 15:03
  • codesign -d --entitlements - <filepath> 2>&1 | LANG=C LC_CTYPE=C sed 's/^.*\<\?xml/\<\?xml/g' | grep "<.*>" Maybe there's another solution, but that's how I strip those bytes. But I don't think it's necessary: you can codesign an app by pointing to an entitlements xml, and macOS will ignore those bytes anyway. – JayB May 18 '19 at 6:29
  • 2
    Add a colon to omit those bytes: codesign -d --entitlements :- /Applications/Whatever.app/ – artyom.stv Jul 1 '19 at 14:32
  • I used jtool --ent /MyApp.app/Contents/MacOS/MyApp @Ken – rustyMagnet Feb 17 '20 at 10:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .