简体   繁体   中英

Alternative way to check if application is installed on MAC OS X?

I have been using Launch Services function LSFindApplicationForInfo() to check if an appication is installed.

This works fine, except when a user send the application to the trash. This method still finds it in the trash but can't invoke it.

Is there another way to check if an application is installed in /Applications? Or can I specify that I want to only look under /Applications when calling LSFindApplicationForInfo()?

我可以通过检查路径来确保以“ / Applications”开头来解决此问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM