Create your First Scene for the Apple Vision Pro using Xcode and VisionOS
What is the Apple Vision Pro?
Apple Vision Pro is the first platform designed from the ground up for spatial computing. Learn how to use existing frameworks like SwiftUI, UIKit, RealityKit, and ARKit to bring your app to visionOS.
- Create familiar windows in the Shared Space. Open one or more windows, which are SwiftUI scenes and appear as planes in space. They use traditional views and controls, and you can open one or more of them to manage your app’s content. Your app’s windows appear alongside other apps, and people can resize windows and position them in their surroundings
- Extend your interface with 3D elements. Add 3D objects or a RealityView to your windows to give them added depth. If you want people to have the ability to view content from all angles, consider creating a volume, which appears in the Shared Space alongside your app’s other windows.
- Increase the level of immersion. When your app opens a Full Space it takes over the whole visionOS canvas. You can place 3D content directly in the person’s surroundings, open a portal to another world, or replace the person’s surroundings altogether. When a Full Space is open, the system shows your app’s windows and volumes, and hides content from other apps.
When you build apps for visionOS, you can mix and match windows, volumes, and spaces at any time in your app to create the right moments for your content. Find key moments in your app where you might want to increase immersion, and provide natural transitions from one level of immersion to another.
People can also run your existing iPadOS or iOS app as a compatible app in visionOS. Your app appears as a single, scalable window in the person’s surroundings.
First download the latest version of Xcode beta (has to be the 15.1 beta or later, xcode 15 lts will not have vision os)
To create a new project in Xcode, choose File > New > Project and follow the prompts to create a visionOS app. All new projects use SwiftUI, which offers a modern declarative programming model to create your…