Check if a Mac OS X application is present
问题 I recall there being a Cocoa framework or AppleScript dictionary to check if an Application bundle with a specific name is installed at all, anywhere on the computer. How do I do this? Either Cocoa, AppleScript, or command line are useful to me. 回答1: You should use Launch Services to do this, specifically the function LSFindApplicationForInfo() . You use it like so: #import <ApplicationServices/ApplicationServices.h> CFURLRef appURL = NULL; OSStatus result = LSFindApplicationForInfo (