Search code examples
macoscocoaapple-documentation

Is it possible to get paths to all apps with the defined bundle identifier


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.

-NSWorkspace absolutePathForAppBundleWithIdentifier

-NSWorkspace URLForApplicationWithBundleIdentifier


Solution

  • Since 10.10, there's LSCopyApplicationURLsForBundleIdentifier().