views:

54

answers:

2

How can I replicate the Finder's "Open With" menu for a given file type?

+1  A: 

LSCopyApplicationURLsForURL could be the basis of a solution.

JWWalker
+1  A: 

This should do the trick:

- (NSArray *)applicationsForURL:(NSURL *)url {
    return [(NSArray *)LSCopyApplicationURLsForURL((CFURLRef)url,
                                                   kLSRolesAll) autorelease];
}
Joshua