On OS X, I'm looking for a command line which would show the known path of a bundleIdentifier from Launch Services point of view.
If there're several bundles with same id, my app keep looking for a trashed one, or copied, and it's hard to troubleshoot without a command like "launchctl .... mybundleId"
In swift, I've found: let launchdPathToHelper = NSWorkspace.sharedWorkspace().absolutePathForAppBundleWithIdentifier(bundleIdHelper)
This helps me and gives me the answer, but sure there's a command line for that.
Thanks!
The standard tool for this sort of thing is
lsregister
:
$ /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump
… lots of output …
You could post-process the output to generate something more focuse.
WARNING Do not ship anything that depends on the presence or output of this tool. Its location, deep within the Core Services framework, indicates that it’s not something that’s officially supported.
ps
launchd
(and hence
launchctl
) and Launch Services operate at very different layers within the OS (
launchd
is the fundamental process management abstraction on the system, which Launch Services is a relatively high-level API). You should not expect to find anything related to Launch Services within
launchctl
.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"