How to create an app that allows immersion in VisionOS

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

Oscar de la Hera Gomez
Written by Oscar de la Hera Gomez
First published on 08/09/2024 at 15:37
Last Updated on 08/13/2024 at 12:17
<p>A flower that represents VisionOS with the text “Immersive Experiences” beneath it.</p>

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

SubscribeWhat is Immersion in Spatial Computing?

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.
Apple: Creating fully immersive experiences in your app

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

How to launch into an immersive space in VisionOS

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.

Download Open Source VisionOS Starter Project

Step One: Create the Immersive Scene

<p>A screenshot of XCode showing a new file that holds a 3D model.</p>

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

Step Two: Add the Space to the App

<p>A screenshot of XCode showing how we added an immersive space to the app.</p>

Add the Space to the app.

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

How to create spaces with multiple immersion styles in VisionOS

Step Three: Update the Main Window

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

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

Step Four: Test

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

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.

<p>A screenshot of the VisionOS Simulator showing the immersive space.</p>

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

How to launch into an immersive space in VisionOS

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

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

Search our Blog

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.
SubscribeContact UsVisit our BlogView our ServicesView our Work

Partner with us

We would love to get to know you and see how we can help your organization with its goals and needs.
Let's Talk

Stay Informed

Get occasional updates about our company, research, and product launches.
Subscribe