How can I accept directory drops to my app icon?
19/01/04 10:02
I would like to accept directories with arbitrary names dropped onto my application icon, in the Dock and elsewhere.
You can set the value for the CFBundleTypeOSTypes key in your Info.plist file to be an array containing the OS Type "fold". If you want only arbitrary folders, specifying 'fold' as the type in the CFBundleTypeOSTypes array of the application's .plist. CFBundleTypeOSTypes array should do it. (If you want everything - any file, folder or volume - to be accepted, specify '****' instead.) In both cases, also specify "*" as the extension in the CFBundleTypeExtensions array, and NSFilenamesPboardType as the CFBundleTypename.