Dropping Files onto Dock Icon in Cocoa

If you’ve set up your Info.plist’s CFBundleDocumentTypes array properly (either ‘LSItemContentTypes’ or ‘CFBundleTypeExtensions’), then you just need to set up an NSApplication delegate and implement the delegate method, application:openFile:. If you’re expecting multiple files to be dropped at once, implement application:openFiles:. For promised files (NSFilesPromisePboardType/kPasteboardTypeFileURLPromise) see Dropping promised files on to application icon in Dock.

How to hide the Dock icon

I think you are looking for the LSUIElement in the Info.plist LSUIElement (String). If this key is set to “1”, Launch Services runs the application as an agent application. Agent applications do not appear in the Dock or in the Force Quit window. Although they typically run as background applications, they can come to the … Read more