Just a correction. It's not openURL but NSWorkspace.shared.open that opens the document. It works fine, but, as I said, it's now bound to a file that is not where the user wants (the app is sandboxed, so it's hiding inside the container in the Library folder).
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: