The application bundle ID
ryandesign at macports.org
Tue Feb 9 23:56:37 UTC 2021
On Feb 9, 2021, at 15:22, Tong Sun wrote:
> I'm in the situation that I need to know an application's bundle ID,
> it's xterm actually. And I'm wondering what's the proper way to get
> any application's bundle ID within MacPorts.
> I found this, but it's not helping --
> I did some further digging, and saw
> configure --prefix=/opt/local . . . -with-bundle-id-prefix=org.macports
> Can I assume that xterm's application bundle ID to be
> Else, what should it be? Thx!
It's not a MacPorts-specific question. The bundle ID of a bundle for any of Apple's Darwin-based operating systems can be found in its Info.plist, which is inside its Contents folder. For example:
$ defaults read /Applications/Safari.app/Contents/Info.plist CFBundleIdentifier
$ defaults read /Applications/MacPorts/X11.app/Contents/Info.plist CFBundleIdentifier
The Portfile in which you saw the --with-bundle-id-prefix=org.macports flag was presumably the xorg-server port, which is the port that installs the X11 app bundle, and indeed because of that flag its bundle ID begins with org.macports.
xterm is not an application bundle; it's a command line utility. Since it is not a bundle, it does not have a bundle identifier.
More information about the macports-users