Drag and drop “.app” onto the application icon

I may be asking an odd question.
I am trying to get some information after dragging and dropping an icon of another application onto the icon of an application built with Xojo and launching it.

I have successfully dragged and dropped the .app onto the icon to launch the application.
This was possible by adding “special/folder” to the file type group.

However, OpenDocument was never called after the .app was dragged and dropped and launched.

Normal folders and folders with different extensions, such as “test.abc”, called OpenDocument, but a folder named “test.app” did not.

I have done the following, are there any other steps that are missing?
-Add “special/folder” (extension “*”) to Custom File Group.
-Add “OpenDocument” to App (only display the path of the item in a dialog)

Try dragging an app (any app) into the filetypesgroup. That will create the file type the way it needs to be for an application. Then on the bottom right side of the new type, there are two popup menus, role and rank.

Role needs to be set based on what your app does… editor or viewer. Typically Viewer for apps. Rank indicates how your app is ranked when someone right-clicks and selects “Open In…”

Thank you for sharing your solution.
This was my first knowledge of dragging and dropping .apps into a file type group to add settings.
However, the problem of .app not calling OpenDocument was not resolved.

This is most likely a Mac spec/issue, as I have tried creating similar applications in Xcode, AppleScript, and Automator, all of which resulted in the .app passed via drag-drop being ignored.

These FileType settings work for me.

Try copying these settings and see it if fires the OpenDocument (API 1) or DocumentOpened (API 2) event

Neither OpenDocument nor DocumentOpened ever occurred.
Perhaps something is wrong with the settings in my environment.
I will try another method that does not use .app.
Thanks for your help.

I’m able to get it working with apps dragged onto the app icon using the FileType settings below. Make sure to set the Role to “View” in FileTypes

Sample Project here if you want to test it out: Drop Apps onto App Icon

Check the Log/Messages tab after dropping apps onto the app icon.