Dear Richard, Thank you for reply! Yes, I would like external device (MacBook) to display the same content as iOS device. I use fully programmatical approach. Sorry for the misleading information provided, by saying window has already been created I meant that the instance of UIWindow and its rootViewController has already been created, before I enabled Screen Mirroring. After enabling Screen Mirroring I see the instantiation of second UIWindowSceneDelegate and willConnectToSession of the second instance is supplied with new scene instance. For my app this is actually the same as creating new instance of my app. To avoid creating second instances I've placed the following code: if(connectingSceneSession.role == UIWindowSceneSessionRoleExternalDisplayNonInteractive) { return nil; } in AppDelegate's configurationForConnectingSceneSession method. But this is not documented, and I am not sure if this will work for all cases. In willConnectToSession. It takes place after connecting to the AirPlay receiver
Topic:
UI Frameworks
SubTopic:
UIKit