How to retrieve all app bundle IDs which can open file at given URL? Like if file at given URL is .xml I want to get array of all app bundle IDs which can open .xml.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use Launch Services’
LSCopyAllRoleHandlersForContentType()to get an array of bundle identifiers of capable applications.Code might look something like the following:
In most recent versions of OS X, Launch Services is part of the
CoreServices.frameworkumbrella framework. You may need to #import it in the class you want to call theLS*functions in, as well as add it to theLink Binary With LibrariesBuild Phase of your target. (It seemed to work OK here without linking against it in the OS X 10.8 SDK).