/

How to Find the Bundle ID of a Mac App

How to Find the Bundle ID of a Mac App

When running a script on a Mac, there may be occasions when you need to find the bundle ID of a specific app that is installed. The bundle ID is a string that resembles a domain name but is written in reverse, such as com.apple.finder or com.microsoft.VSCode. In this article, we will guide you through the steps to discover the bundle ID using a simple script.

To find the bundle ID of a Mac app, you can use the following script:

1
osascript -e 'id of app "Finder"'

The osascript command is a tool that executes AppleScript code. In this case, the AppleScript code id of app "Finder" is used to query the Mac for the bundle ID of the app named “Finder”.

Bundle ID of a Mac App

By utilizing this script, you can easily find the bundle ID of any Mac app that you have installed. This information can be valuable in various scenarios, such as script automation or troubleshooting.

Tags: Mac app, bundle ID, script, AppleScript