I need to check if the app exist on system disk. And it works fine if I don't have connected external hard drive. But it also returns me the path to apps on external hard drive sometimes.
I use absolutePathForAppBundleWithIdentifier method of NSWorkspace.
It is described in documentation. But I'm currently unable to find what I need.
Since 10.10, there's
LSCopyApplicationURLsForBundleIdentifier()
.