Find out the “Open With” menu items in Finder
-
29-09-2019 - |
Question
How can I replicate the Finder's "Open With" menu for a given file type?
Solution
This should do the trick:
- (NSArray *)applicationsForURL:(NSURL *)url {
return [(NSArray *)LSCopyApplicationURLsForURL((CFURLRef)url,
kLSRolesAll) autorelease];
}
OTHER TIPS
LSCopyApplicationURLsForURL
could be the basis of a solution.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow