How to start with visionOS

Asked on 08/03/2024

1 search

To start with visionOS, you can follow these steps based on the content presented at WWDC:

  1. Explore VisionOS Capabilities:

    • VisionOS is designed with people at the center of the experience, ensuring interactions are comfortable and delightful. It's important to find your app's "key moment" that is optimized for VisionOS. For example, the Mindfulness app uses a gentle pulse of a flower to encourage breathing and focus, creating an experience unique to VisionOS. (Design great visionOS apps)
  2. Use Familiar Tools and Frameworks:

    • VisionOS is built on the foundation of macOS, iOS, and iPadOS, meaning many tools and frameworks like SwiftUI, RealityKit, and ARKit are common across these platforms. This allows you to write code once and use it across all platforms. (Platforms State of the Union)
  3. Convert Existing Apps:

    • If you have an existing iOS or iPadOS app, you can start by recompiling it for VisionOS. For example, DJ started with their SwiftUI-based iPad app, recompiled it to run on VisionOS, and then extended it for spatial computing. (Platforms State of the Union)
  4. Utilize VisionOS SDK:

    • To start using the VisionOS SDK, go to the build settings of your app and select the iOS target. Add Apple Vision as a supported destination to compile the app. You might encounter some compilation errors, but most of the code should compile if the app was made for iOS. (Bring your iOS or iPadOS game to visionOS)
  5. HealthKit Integration:

    • If your app uses HealthKit, you can add VisionOS as a destination to your app target, enabling it to run on the platform. Standard SwiftUI components like TabView and sheets translate beautifully to VisionOS. (Get started with HealthKit in visionOS)
  6. Design Interactive Experiences:

    • When designing for VisionOS, consider how windows and volumes are positioned in space. Use features like scene understanding and head position to create a seamless and magical experience for users. (Design interactive experiences for visionOS)

By following these steps, you can start developing and optimizing your apps for VisionOS, leveraging the unique capabilities and immersive experiences it offers.