I’m having trouble building my app due to the persistentSystemOverlays(.hidden) modifier, which is only available in visionOS 2.0 or newer. As shown in the attached screenshot, the line prevents me from building the project.
I’ve tried using conditional logic to apply this modifier only on visionOS 2.0 or later, but I haven’t had any success. Does anyone have experience with this issue? How can I conditionally apply this modifier or ensure compatibility across visionOS versions?
Any guidance or examples would be greatly appreciated.