My app needs to display through the iMac and Apple TV for the demonstration purpose
But during the AirPlay the app navigation is stuck because of the root view controller is getting as nil
I am using the below code to get the root view controller
let scenes = UIApplication.shared.connectedScenes let windowScene = scenes.first as? UIWindowScene let window = windowScene?.windows.first
return window?.rootViewController
Since rootViewController is nil, I can't push a new VC or pop to a specific VC in the navigation stack
Only when the Air Play is turned off, I can continue the navigation in the app
So this really becoming a blocker issue. Please provide your comments
I am running on iOS 16.1.1 in the iPhone and My Xcode version is 14.3