The Robservatory

Robservations on everything…

 

Easily see any app’s bundle identifier

I occasionally need to help one of our customers get the bundle identifier for a given app, for some purpose with one of our apps. While the task isn’t complicated—the value is stored in a file named Info.plist within each app bundle—it’s not something that’s necessarily easy to explain to someone who doesn’t have a lot of Mac experience.

I figured there must be a less-complicated solution, and I was right, though it’s probably higher on the geek factor. After some searching, I found this thread at Super User, which offers a number of solutions. The simplest—and always working, in my experience—was the very first one: Open Terminal and run this command:

osascript -e 'id of app "Name of App"'

The "Name of App" is replaced with the name of the app as it appears when hovering over its Dock icon. For Excel, for example, it’d be:

osascript -e 'id of app "Microsoft Excel"'

Run that command, and it returns com.microsoft.Excel, which is just what I need—I just have the customer copy the output and email it back to me.

1 Comment

Add a Comment
  1. AppleScript droplet to place bundle identifier of dropped app package on clipboard.

    on open theses
    set i to (item 1 of theses)
    set app_identifier to bundle identifier of (info for (i))
    set the clipboard to app_identifier
    display dialog "The text " & "\"" & app_identifier & "\"" & space & "has been placed on the clipboard."
    end open

Leave a Reply

The Robservatory © 2018 • Privacy Policy Built from the Frontier theme