View in English

  • Apple Developer
    • Get Started

    Explore Get Started

    • Overview
    • Learn
    • Apple Developer Program

    Stay Updated

    • Latest News
    • Hello Developer
    • Platforms

    Explore Platforms

    • Apple Platforms
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    Featured

    • Design
    • Distribution
    • Games
    • Accessories
    • Web
    • Home
    • CarPlay
    • Technologies

    Explore Technologies

    • Overview
    • Xcode
    • Swift
    • SwiftUI

    Featured

    • Accessibility
    • App Intents
    • Apple Intelligence
    • Games
    • Machine Learning & AI
    • Security
    • Xcode Cloud
    • Community

    Explore Community

    • Overview
    • Meet with Apple events
    • Community-driven events
    • Developer Forums
    • Open Source

    Featured

    • WWDC
    • Swift Student Challenge
    • Developer Stories
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Centers
    • Documentation

    Explore Documentation

    • Documentation Library
    • Technology Overviews
    • Sample Code
    • Human Interface Guidelines
    • Videos

    Release Notes

    • Featured Updates
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • Downloads

    Explore Downloads

    • All Downloads
    • Operating Systems
    • Applications
    • Design Resources

    Featured

    • Xcode
    • TestFlight
    • Fonts
    • SF Symbols
    • Icon Composer
    • Support

    Explore Support

    • Overview
    • Help Guides
    • Developer Forums
    • Feedback Assistant
    • Contact Us

    Featured

    • Account Help
    • App Review Guidelines
    • App Store Connect Help
    • Upcoming Requirements
    • Agreements and Guidelines
    • System Status
  • Quick Links

    • Events
    • News
    • Forums
    • Sample Code
    • Videos
 

Vidéos

Ouvrir le menu Fermer le menu
  • Collections
  • Toutes les vidéos
  • À propos

Plus de vidéos

  • À propos
  • Code
  • Develop your first immersive app

    Find out how you can build immersive apps for visionOS using Xcode and Reality Composer Pro. We'll show you how to get started with a new visionOS project, use Xcode Previews for your SwiftUI development, and take advantage of RealityKit and RealityView to render 3D content.

    Chapitres

    • 0:00 - Introduction
    • 1:06 - Create an Xcode project
    • 8:57 - Simulator
    • 12:12 - Xcode Previews
    • 13:34 - Reality Composer Pro
    • 20:18 - Create an immersive scene
    • 25:28 - Target gestures to entities
    • 30:16 - Wrap-up

    Ressources

      • Vidéo HD
      • Vidéo SD

    Vidéos connexes

    WWDC23

    • Build spatial experiences with RealityKit
    • Get started with building apps for spatial computing
    • Go beyond the window with SwiftUI
    • Meet ARKit for spatial computing
    • Meet Reality Composer Pro
    • Meet UIKit for spatial computing
    • Take SwiftUI to the next dimension
    • Work with Reality Composer Pro content in Xcode
  • Rechercher dans cette vidéo…
    • 6:54 - Glass background effect

      VStack {
              Toggle("Enlarge RealityView Content", isOn: $enlarge)
                  .toggleStyle(.button)
          }
          .padding()
          .glassBackgroundEffect()
    • 7:28 - RealityView

      RealityView { content in
          // Add the initial RealityKit content
          if let scene = try? await Entity(named: "Scene", in: realityKitContentBundle) {
              content.add(scene)
          }
      } update: { content in
          // Update the RealityKit content when SwiftUI state changes
          if let scene = content.entities.first {
              let uniformScale: Float = enlarge ? 1.4 : 1.0
              scene.transform.scale = [uniformScale, uniformScale, uniformScale]
          }
      }
      .gesture(TapGesture().targetedToAnyEntity().onEnded { _ in
          enlarge.toggle()
      })
    • 20:31 - ImmersiveView

      // MyFirstImmersiveApp.swift
      
      @main
      struct MyFirstImmersiveApp: App {
          var body: some Scene {
              WindowGroup {
                  ContentView()
              }.windowStyle(.volumetric)
      
              ImmersiveSpace(id: "ImmersiveSpace") {
                  ImmersiveView()
              }
          }
      }
    • 22:58 - Size that fits

      #Preview {
          ImmersiveView()
              .previewLayout(.sizeThatFits)
      }
    • 23:48 - openImmersiveSpace

      struct ContentView: View {
      
          @Environment(\.openImmersiveSpace) var openImmersiveSpace
      
          var body: some View {
              Button("Open") {
                  Task {
                      await openImmersiveSpace(id: "ImmersiveSpace")
                  }
              }
          }
      }
    • 25:48 - Entity targeting

      import SwiftUI
      import RealityKit
      
      struct ContentView: View {
          var body: some View {
              RealityView { content in
                  // For entity targeting to work, entities must have a CollisionComponent
                  // and an InputTargetComponent!
              }
              .gesture(TapGesture().targetedToAnyEntity().onEnded { value in
                  print("Tapped entity \(value.entity)!")
              })
          }
      }
    • 28:56 - Move animation

      .gesture(TapGesture().targetedToAnyEntity().onEnded { value in
          var transform = value.entity.transform
          transform.translation += SIMD3(0.1, 0, -0.1)
          value.entity.move(
              to: transform,
              relativeTo: nil,
              duration: 3,
              timingFunction: .easeInOut
          )
      })

Developer Footer

  • Vidéos
  • WWDC23
  • Develop your first immersive app
  • Open Menu Close Menu
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • Icon Composer
    • SF Symbols
    Open Menu Close Menu
    • Accessibility
    • Accessories
    • Apple Intelligence
    • Audio & Video
    • Augmented Reality
    • Business
    • Design
    • Distribution
    • Education
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Machine Learning & AI
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Downloads
    • Sample Code
    • Videos
    Open Menu Close Menu
    • Help Guides & Articles
    • Contact Us
    • Forums
    • Feedback & Bug Reporting
    • System Status
    Open Menu Close Menu
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles
    • Feedback Assistant
    Open Menu Close Menu
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program
    • Mini Apps Partner Program
    • News Partner Program
    • Video Partner Program
    • Security Bounty Program
    • Security Research Device Program
    Open Menu Close Menu
    • Meet with Apple
    • Apple Developer Centers
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Academies
    • WWDC
    Read the latest news.
    Get the Apple Developer app.
    Copyright © 2026 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines