Does anyone know a good way to find (in the file system) every application with a given package identifier? NSWorkspace and Launch Services let you search for an application by package ID, but return only one result. I suspect that Spotlight ( NSMetadataQuery ) may help, but I don't understand its API a bit, so I'm not sure if there is a corresponding key.
Here is the lsregister command line lsregister (inside LaunchServices.framework) that can be passed (re) to register everything on the system and then reset the report of everything that it knows. Based on this, it seems less ideal, since it does not document and analyze its output, there may be pain.
(Background: I am creating a game modding application and want to provide an interface for quickly selecting from a short list of supported games, instead of requiring the user to dig through the entire file system in the Open panel. Expect the user to have several copies of the installed game: release and beta, additional copies for modding, etc.)
source share