So it does help to drag the file to the right icon... (since I was debugging it under Xcode, but had the "real" one in my dock).
That seems to do it better, but weirdly, it's not happening the first time I drag a file onto the icon. Also, I have this in the main view:
.handlesExternalEvents(preferring: ["my-scheme"], allowing: ["my-scheme"]) // activate existing window if exists
.onOpenURL { url in
// stuff
}
and both the .openURL and the app delegate method are being triggered. I think this is probably due to confusion on my part, though.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: