Post

Replies

Boosts

Views

Activity

How do you support Drag and Drop open file in SwiftUI DocumentGroup app
This is a macOS specific question, may not apply to iOS as much. If I want to support Drag and Drop functionality to open new files in DocumentGroup based app, it's unclear how to do it. The sequences I want are this: Sequence 1: App opens with a non-document welcome/onboarding window User drags and drops file1.txt to that window. Sequence 2: Open any file, lets say file1.txt with Command+O Drag and drop file2.txt in to that window, because user wants to override the already open file. In both cases, of course ContentView can field the drop request, but it's unclear how I would pass on the URL to DocumentGroup. May be a simpler form of this question is, how can I programatically tell DocumentGroup to open a specific file (file URL).
0
0
615
Dec ’20