Restoring View controller hierarchy for scene state restoration before window is showing

I'm working on adding multiple window support to my app. My app is a document based app, with one view controller serving as the document browser (document selector) and a second view controller  for editing the document (document controller). The document selector is the root view controller.

Normally, when the user taps a document icon in the selector, my app presents the document controler over the selector. When restoring the scene (when it has an open document)  I want to do the same (so to have the document selector underneath and on top of it show the document editor) but without showing the user document opening animations and so on.

Problem is, if I try to do all the document opening before the window is showing I'm getting the follwoing error:

[Presentation] Attempt to present <ERDocumentController: 0x7fd859020400> on <ERDocumentSelector: 0x7fd857c0cd60> (from <ERDocumentSelector: 0x7fd857c0cd60>) whose view is not in the window hierarchy.

And if I do the document opening after showing the window, I see the animation (and even if I remove the animation, I still see the document selector for a little bit).

Is there a way to setup this hierarchy before showing the window?
Restoring View controller hierarchy for scene state restoration before window is showing
 
 
Q