How to create an app that allows immersion in VisionOS

Oscar de la Hera Gomez
A flower that represents VisionOS with the text “Immersive Experiences” beneath it.

Immersive experiences can be created using RealityKit or Metal and must be activated from the main window.

Caveats

  • Immersive spaces work similarly to windows and volumes, and require a unique identifier.
  • Immersive experiences can be opened and dismissed from a button within a window (i.e. the main window).
  • The immersion will break if a user breaks a 1.5m radius from where the person initiated the immersive experience.

Finally, you can start an app in a fully immersive or progressive immersion state. To learn more follow the tutorial below.

Tutorial

The code for this tutorial can be found in the repository linked below on the 101/immersive-app-realitykit-starter branch.

Please note this tutorial demonstrates how to create an immersive space that uses RealityKit.

Step One: Create the Immersive Scene

A screenshot of XCode showing a new file that holds a 3D model.

Create a new file that holds the logic for your immersive space.

Step Two: Add the Space to the App

A screenshot of XCode showing how we added an immersive space to the app.

Add the Space to the app.

If you are looking to allow the space to allow for multiple immersive styles, consult the tutorial below.

Step Three: Update the Main Window

A screenshot of XCode showing how we updated the main window to allow it to open and close the immersive space.

Update the main window to use the openImmersiveSpace and dismissImmersiveSpace variables to open the scene added in Step Two.

Step Four: Test

A screenshot of the VisionOS simulator showing the pop up that appears when you open an immersive space.

A pop up will appear when you activate an immersive space.

Run the App and make sure that you can enter and exit the immersive space.

A screenshot of the VisionOS Simulator showing the immersive space.

An example of an open immersive space. Pressing the close button will exit the space.

To learn how to start an app in a fully immersive or progressive immersion state, follow the tutorial below

Looking to learn more about VisionOS, Spatial Computing, Design and Technology?

Search our blog to learn more about visionOS, spatial computing, design and technology.

Any Questions?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.
delasign logo

Book a Free Consultation.

An icon of an email.

Click here to email us.

Fill in the details below to book a free consultation or to let us know about something else. Whatever it is, we are here to help.

How can we help you ?

Contact Details