NSApplicationDelegate open URLs only called after second drop

I want to make a simple droplet application. I've set the document types to include com.adobe.pdf files, and I am now receiving callbacks to the app delegate's application(_:open:) callback when I drop PDFs on the app icon…

But not the first time. It doesn't matter how long I wait, or whether the app is already open—the first drop never triggers the callback. All subequent drops work as expected, and I get URLs to all the files dropped.

What might be wrong? How can I debug this?

Can you provide some code so we can see what you're doing?

looking at the documentation for application(_:open:) I don't see any explanation for what you have described.

NSApplicationDelegate open URLs only called after second drop
 
 
Q