iOS 13 SDK and external screens (UIWindow.screen is deprecated)

Prior to iOS 13, to activate the external display we had to do something like:


UIScreen *externalScreen = [[UIScreen screens] objectAtIndex:1];

UIWindow* window = [[UIWindow alloc] init];

window.screen = externalScreen;


However, UIWindow.setScreen is deprecated in iOS 13 and it expects a UIWindowSceen instead via UIWindow.setWindowScene. How do we get a UIWindowScene for the external display?

You don't tell what you have tried so far and what is your environment (use Combine ?)

Did you add a UISceneSession ?


If this may help:

h ttps://fleetingpixels.com

iOS 13 SDK and external screens (UIWindow.screen is deprecated)
 
 
Q