2

我需要检查该应用程序是否存在于系统磁盘上。如果我没有连接外部硬盘驱动器,它工作正常。但它有时也会让我返回到外部硬盘驱动器上的应用程序的路径。

我使用 NSWorkspace 的 absolutePathForAppBundleWithIdentifier 方法。

它在文档中进行了描述。但我目前无法找到我需要的东西。

-NSWorkspace absolutePathForAppBundleWithIdentifier

-NSWorkspace URLForApplicationWithBundleIdentifier

4

1 回答 1

2

从 10.10 开始,有LSCopyApplicationURLsForBundleIdentifier().

于 2017-09-01T12:44:13.757 回答