I'm writing an app that requires a folder to be opened with it.
I'd like to see if a folder can be dragged onto the app icon (in the dock, for instance) and the ap开发者_Python百科p to recognise it as a valid type to open. How can I associate in xcode the folder type to my app, via the list of UTIs?
Thanks in advance.
Found the solution in the form of:
(a) editing the Info.plist file with an UTI entry for public.folder,
(b) overriding the function application:openFile: in my implementation of NSApplicationDelegate.
All works now.
精彩评论