开发者

Get the list of applications which can open a file in Mac OS X [duplicate]

开发者 https://www.devze.com 2023-02-22 08:24 出处:网络
This question already has an answer here: Closed 11 years ago. Possible Duplicate: List potential applications that could open a file
This question already has an answer here: Closed 11 years ago.

Possible Duplicate:

List potential applications that could open a file

How can I get the list of applications registered to open a specific file (from its path) under Mac OS X, in objective-C开发者_如何学JAVA?


Launch Services Programming Guide has the information you need. But basically you can get that list multiple ways. If you have the URL to the file, you would use LSCopyApplicationURLsForURL.

For example: LSCopyApplicationURLsForURL(fileURL, kLSRolesViewer | kLSRolesEditor);

0

精彩评论

暂无评论...
验证码 换一张
取 消