Skip to content

Instantly share code, notes, and snippets.

@detj
Last active November 1, 2023 21:58
Show Gist options
  • Save detj/0366f12632515fb0b37016daff8b2015 to your computer and use it in GitHub Desktop.
Save detj/0366f12632515fb0b37016daff8b2015 to your computer and use it in GitHub Desktop.
Find bundle identifier of a macOS app
# find the bundle identifier of Numbers app
codesign -dv /Applications/Numbers.app/
# explanation of the flags used
#
# -d, --display Display information about the code at the path(s) given.
# -v, --verify Requests verification of code signatures
# one line to directly extract the bundle identifier using [rg](https://github.com/BurntSushi/ripgrep)
codesign -dv /Applications/Numbers.app/ 2>&1 | rg '^Identifier=' --replace ""
@detj
Copy link
Author

detj commented Nov 1, 2023

tested on macOS 14.1 (Sonoma)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment