It’s time for an adventure in app bundle identification!
As a Mac admin there are times where you need to find the Bundle ID of a macOS or iOS application. This might be for an app config, if you’re blocking an app by its bundleid (oftentimes more reliable using a file path), or if you’re configuring PPPC Profiles for an application..
Finding macOS App Bundle IDs
Method 1 – Using Terminal
Finding an app’s Bundle ID on the mac is pretty straight forward. All you have to do is open Terminal and enter the following command:
codesign -dr - /path/to/yourapp.app
Pro Tip: You can drag and drop your app into Terminal right after the codesign -dr – to get the full path of the application.
It will spit out both the certificate leaf and the Bundle ID. I mention this method first because usually when admins are trying to look up a Bundle ID it’s for creating a PPPC Profile, and that usually requires the certificate leaf as well.
In the example below I can see the Bundle ID for Brave Browser is
Everything past the
designated => will be your certificate leaf.
$ codesign -dr - "/Applications/Brave Browser.app" Executable=/System/Volumes/Data/Applications/Brave Browser.app/Contents/MacOS/Brave Browser designated => identifier "com.brave.Browser" and anchor apple generic and certificate 1[field.1.2.840.113622.214.171.124.6] /* exists */
Method 2 – Info.plist
You can also find an app’s Bundle ID by inspecting it’s package contents. Right click on the app you want to retrieve the bundle ID for and choose Show Package Contents.
Inside of the Contents folder is an Info.plist. This will contain a
CFBundleIdentifier key containing the Bundle ID in its key value.
You can also read the
CFBundleIdentifier key value pair with a piece of code using something like PlistBiddy:
$ /usr/libexec/PlistBuddy -c 'Print CFBundleIdentifier' "/Applications/Brave Browser.app/Contents/Info.plist" com.brave.Browser
Finding iOS App Bundle IDs
What about iOS/iPadOS/tvOS Apps though? Finding the bundle ids for those doesn’t have to be hard. The easy way is to use one of the following websites:
If you can’t find what you’re looking for using the above options, you may have to look for the Bundle ID yourself. Navjot Virk has a great post on how to find a bundle ID of an iOS app.