Re: List of all supported apps for file type

2010-05-23 Thread Chaitanya Pandit
You can do "CFArrayRef applications = LSCopyApplicationURLsForURL((CFURLRef)fileUrl, kLSRolesAll);" to get the applications and then call: - (BOOL)getInfoForFile:(NSString *)fullPath application:(NSString **)appName type:(NSString **)ty To get the application details On May 24, 2010, at 4:27

Re: List of all supported apps for file type

2010-05-23 Thread Dave DeLong
That's really good to know! Thank you for sharing this. :) Dave On May 23, 2010, at 8:51 PM, Scott Ribe wrote: > On May 23, 2010, at 5:03 PM, Dave DeLong wrote: > >> Use LSCopyAllRoleHandlersForContentType to get a list of bundle identifiers. > > No, don't. It's really lame, and returns obvi

Re: List of all supported apps for file type

2010-05-23 Thread Scott Ribe
On May 23, 2010, at 5:03 PM, Dave DeLong wrote: > Use LSCopyAllRoleHandlersForContentType to get a list of bundle identifiers. No, don't. It's really lame, and returns obviously incomplete results. Maybe it only returns Cocoa apps; maybe it only returns apps that specify the type via explicit U

Re: List of all supported apps for file type

2010-05-23 Thread Dave DeLong
Use LSCopyAllRoleHandlersForContentType to get a list of bundle identifiers. The bundle identifiers you can convert into full paths using NSWorkspace, which also has a method to retrieve an icon that for a file at a full path (which in the case of an app, will return an app icon). Cheers, Dav

Re: List of all supported apps for file type

2010-05-23 Thread Joar Wingfors
The API:s to use for things like this would be NSWorkspace, and Launch Services. In that order of preference. j o a r On 23 maj 2010, at 15.57, Trygve Inda wrote: > I know I have seen this code before but in the last 30 minutes of digging, I > can't find it. > > How can I get a list of bundle

List of all supported apps for file type

2010-05-23 Thread Trygve Inda
I know I have seen this code before but in the last 30 minutes of digging, I can't find it. How can I get a list of bundle identifiers (or paths to an app) for all the apps that can open a file of a given type (eg pdf, mp3 etc) Then, How can I get an icon for these apps? Basically I want to buil