What I want to achieve is to drop files on the app's dock icon. It's well understood how to do it, no questions there. I tried to make it work with my existing project, but the icon does not get dimmed and the AppDelegate
would not get called.
So I created another project and it worked out of the box.
What my question boils down to: If I generate a new macOS project with Storyboards, this just works. If I generate a new project without checking the Storyboards box, it doesn't.
Is there something I miss? It's basically solved: I just generated a new project, moved all of the code and assets - done. But I'd like to understand the issue :-)
The Info.plist looks like this in both cases:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>*</string>
</array>
<key>CFBundleTypeName</key>
<string>AllFiles</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2018 Wukerplank. All rights reserved.</string>
<key>NSMainStoryboardFile</key>
<string>Main</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
The only difference of course is
<key>NSMainStoryboardFile</key>
<string>Main</string>
vs
<key>NSMainNibFile</key>
<string>MainMenu</string>
(Xcode 10.1, macOS Mojave)