This only works if I create my own window. I am relying on the SwiftUI app's default create window function. There is another suggestion in the link where NSApplication.shared.keyWindow?.close()
is suggested. This works.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: