问题
For example i run in console "open -b com.apple.dt.Xcode", how does open determine what program to launch?
回答1:
If you want path to program, you can use applescript.
osascript -e "POSIX path of (path to application id \"com.apple.dt.Xcode\")"
回答2:
Bundle identifiers are generally declared in an applications's app bundle Info.plist
. The values are identified and registered by various means in OS X and managed in the Launch Services
database. Read the Launch Services Programming Guide for detailed information, in particular, the section on Application Registration.
来源:https://stackoverflow.com/questions/13084324/where-does-open-b-bundle-indentifier-get-path-to-program-from