Can I attach a RealityKit object to a SwiftUI view?
Asked on 06/12/2025
1 search
Yes, you can attach a RealityKit object to a SwiftUI view. In VisionOS 26, Apple introduced new SwiftUI RealityKit components that enable this integration. The View Attachment component allows you to add SwiftUI views directly to RealityKit entities. This means you can declare your UI inline with the rest of your RealityKit code, making it possible to add SwiftUI views to your 3D scenes as components. This integration is designed to make RealityKit entities responsive to gestures and capable of presenting SwiftUI views like popovers from within your RealityKit scene.
For more details, you can refer to the session Better together: SwiftUI and RealityKit (15:35).

Better together: SwiftUI and RealityKit
Discover how to seamlessly blend SwiftUI and RealityKit in visionOS 26. We’ll explore enhancements to Model3D, including animation and ConfigurationCatalog support, and demonstrate smooth transitions to RealityView. You’ll learn how to leverage SwiftUI animations to drive RealityKit component changes, implement interactive manipulation, use new SwiftUI components for richer interactions, and observe RealityKit changes from your SwiftUI code. We’ll also cover how to use unified coordinate conversion for cross-framework coordinate transformations.

What’s new in visionOS 26
Explore exciting new features in visionOS 26. Discover enhanced volumetric APIs and learn how you can combine the power of SwiftUI, RealityKit and ARKit. Find out how you can build more engaging apps and games using faster hand tracking and input from spatial accessories. Get a sneak peek at updates to SharePlay, Compositor Services, immersive media, spatial web, Enterprise APIs, and much more.

What’s new in SwiftUI
Learn what’s new in SwiftUI to build great apps for any Apple platform. We’ll explore how to give your app a brand new look and feel with Liquid Glass. Discover how to boost performance with framework enhancements and new instruments, and integrate advanced capabilities like web content and rich text editing. We’ll also show you how SwiftUI is expanding to more places, including laying out views in three dimensions.