This needs to be explicitly handled or rejected, otherwise the app crashes with the error:
Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'A view can only be associated with at most one view controller at a time!'
External display connection invokes
scene:willConnectTo:options
again with the session role.windowExternalDisplayNonInteractive
:https://developer.apple.com/documentation/uikit/windows_and_screens/presenting_content_on_a_connected_displayThis needs to be explicitly handled or rejected, otherwise the app crashes with the error: Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'A view can only be associated with at most one view controller at a time!'