开发者

Check whether an application exists on Mac from cocoa application

How can I check from my cocoa Mac application whether an application (for example:开发者_运维问答 Preview or iPhoto) exists on Mac?

I basically want to give the user an option to open an image using Preview, iPhoto but before doing that I would like to check whether these applications are present on the user's Mac.


Instead of checking for specific hard-coded applications, it'd be better to get a list of all applications that can handle the type of document you'll be passing to them. That way, if the user has installed, say, Acorn, it'll automatically show up without your having to add it to your hard-coded list.

There is also a way to do what you specifically asked for, but that is an inferior way to do what you really want to do, which is show the user all of their applications that can open the document.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜