Drag and Drop on macOS with Swift 4.2 or 5 A simple Cocoa app accepts .xml files and print the paths. NSImageView image method was created by PaintCode. I have rewrote from the base following the article. For more details, please visit the website Screen shot: