I was trying to make my app to support multiple windows using swiftUI, and the only thing I succeed was to open new window when clicking on button. This is the code I used.