How to let immersive spaces coexist with system environments
Starting in visionOS 26, we can open immersive spaces that can coexist with system environments.
We can do this by using the new immersiveEnvironmentBehavior scene modifier on the immersive space. We set the behavior to .coexist.
ImmersiveSpace(id: appModel.immersiveSpaceID) {
ImmersiveView()
}
.immersionStyle(selection: .constant(.mixed), in: .mixed)
.immersiveEnvironmentBehavior(.coexist)The other options are .replace and .automatic (which uses the replace behavior). The documentation makes it clear that the value we specify is only a request. Ultimately, visionOS will determine if this is honored.
Video Demo
You can find the code for this example in Garden029 in the Step Into Example Projects repo.
Download the Xcode project with this and many more examples from Step Into Vision.
Some examples are provided as standalone Xcode projects. You can find those here.


Follow Step Into Vision