UIKit · property
UIScreen.main
Deprecated in iOS 26. On a two-display device a single global main screen has no well-defined meaning, so read the screen from the window scene instead.
If you landed here from a compiler warning, this is the one:
'main' was deprecated in iOS 26.0: use a UIScreen instance found through
context instead (i.e, view.window.windowScene.screen), or for properties
like UIScreen.scale with trait equivalents, use a traitCollection found
through context.
Why it was deprecated
iPhone Duo is the first iPhone with two displays. “The main screen” had a single obvious answer on every previous iPhone and does not have one here: your app may be on the inner display, the outer display, or moving between them while running.
The deprecation is not iPhone Duo-specific — it landed in iOS 26, before the device — but the device is what makes ignoring it visible.
What to use instead
Read the screen from the context the view is already in:
// Was
let scale = UIScreen.main.scale
let bounds = UIScreen.main.bounds
// Now
let scale = view.traitCollection.displayScale
let bounds = view.window?.windowScene?.screen.bounds ?? .zero
For anything that is really about the space your view has, prefer the view’s own bounds over any screen at all. A screen is rarely the right question.
What goes wrong if you leave it
It still compiles, and on a single-display iPhone it still works. On iPhone Duo it returns a screen that may not be the one your content is on, which shows up as the wrong scale factor, the wrong bounds, or blurry rendering after the app moves between displays.
Finding every occurrence
grep -rn "UIScreen.main" --include="*.swift" --include="*.m" --include="*.mm" .
Doing the work
This page describes the symbol. For the migration as a task, with its severity and the order to do it in, see stop using UIScreen.main.