title: Open a new window in Mac Catalyst
body: <p>I am porting an iPad app using Mac Catalyst. I am trying to open a View Controller in a new window. </p>
  
  <p>If I were using strictly AppKit I could do something as described in this <a href="https://stackoverflow.com/questions/30921737/open-new-window-in-swift">post</a>. However, since I am using UIKit, there is no <code>showWindow()</code> method available. </p>
  
  <p><a href="https://www.highcaffeinecontent.com/blog/20190607-Beyond-the-Checkbox-with-Catalyst-and-AppKit" rel="noreferrer">This article</a> states that this is possible by adding AppKit in a new bundle in the project (which I did), however it doesn't explain the specifics on how to actually present the new window. It reads...</p>
  
  <blockquote>
    <p>Another thing you cannot quite do is spawn a new <code>NSWindow</code> with a UIKit view hierarchy. <em>However</em>, your UIKit code has the ability to spawn <em>a new window scene</em>, and your AppKit code has the ability to take the resulting NSWindow it's presented in and hijack it to do whatever you want with it, so in that sense you could spawn UIKit windows for auxiliary palettes and all kinds of other features. </p>
  </blockquote>
  
  <p>Anyone know how to implement what is explained in this article?</p>
  
  <p><strong>TL;DR:</strong> How do I open a <code>UIViewController</code> as a new separate <code>NSWindow</code> with Mac Catalyst?</p>