Xcode build error: UIScreen is not available

I try to compile a fully immersive (VR) project but Xcode fails to compile with the following error

/Volumes/MacDev/Projects/Unity-Novelab/indus_ar/ARIndus/Build/Classes/Unity/DisplayManager.h:10:13: ‘UIScreen’ is unavailable: not available on visionOS

How can I fix this?


Can you double check that you’re using Xcode beta 2? Newer betas are not yet supported.

OK I’m on beta 5, sorry

Is there a fix for PolySpatial 2.2 which requires xcode Beta 5? We are building an immersive space from scratch and are still seeing this error in PolySpatial 2.2
“UIScreen’ is unavailable: not available on visionOS”

The fix here is to add a step to here
Project Settings / XR Plug in Management / Apple Vision OS / App Mode / set to Virtual Reality

However, there’s now a SIGABT on thread 1.

1 Like

We get the same now. Did you find a reason for your SIGABRT? Anything Polyspatial specific?

AFAIR setting the device target to Simulator (Thx @P-LL for the below) fixed it for us. I will check when I get back to my desk.

`I think this thread adresses it. VR Apps Fail to Run in Simulator . Essentially, settings the Device target to “Simulator” as stated here should allow you to run the build in VR mode on the Simulator.

1 Like