How to check if the current iOS device supports multiple scenes/windows?

1.6k Views Asked by At

I'm adding an "Open in New Window" context menu item which opens one of my app's documents in a new UIScene. Of course, I only want to show that menu item on devices which actually support multiple scenes.

Currently I'm just checking if the device is an iPad using good old:

if UIDevice.current.userInterfaceIdiom == .pad

Is there a more precise way of checking whether the device supports this specific capability?

1

There are 1 best solutions below

1
On BEST ANSWER

Check UIApplication property supportsMultipleScenes.

Use the connectedScenes property to determine whether multiple scenes are present.

More info from official documentation here