Re: macOS Drag and Drop onto App Icon


On Apr 20, 2019, at 3:31 PM, Bill Pitcher <bill@...> wrote:

My problem is finding a correct (App Store approval) method to enable drag and drop to the App Icon.
I'm fan of this Mac feature and consider it an act of "user intent" but I can't find a override to get the dropped URL.

Same as it ever was — just implement the -application:openFile: method in your app delegate.
You also need to edit your Info.plist to include the document types your app knows how to open.

To my knowledge, none of this is affected by sandboxing. The sandbox allows your app to access any files that the user has explicitly asked it to open, via drag-and-drop or the Open panel.


Join to automatically receive all group messages.