Where does “open -b bundle_indentifier” get path to program from?

吃可爱长大的小学妹 提交于 2019-12-11 09:36:08

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!