Catalyst: Need Help Dragging to App Icon

In AppKit, I can implement NSApplicationDelegate methods for application:openFiles: and such.

However, I have not found something similar when using Catalyst - I cannot set the NSApplicationDelegate, and the UIApplicationDelegate methods I have tried are not called when I try dragging a file to the app icon (the icon lights up, so I believe I have configure it properly).

Does anyone know how to do that / have a sample that works? Thanks.

Answered by Nik Bhatt in 800834022

I found it. I was looking in the application delegate, but needed to look in the scene delegate. The method is

func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>)

Accepted Answer

I found it. I was looking in the application delegate, but needed to look in the scene delegate. The method is

func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>)

Catalyst: Need Help Dragging to App Icon
 
 
Q