I found a way how you can reproduce it, for a new project with "Immersive Environment App", you just have to set UIImmersionStyleFull
for UISceneInitialImmersionStyle
in the info.plist file. And in the app file you can use the following code, the only changes are that the immersion style gets changed to .mixed and that the window gets opened once the immersive space shows up. When you then move back in the simulator, the handles are hidden at some point:
import SwiftUI
@main
struct SkySphereTestApp: App {
@State private var appModel = AppModel()
@State private var avPlayerViewModel = AVPlayerViewModel()
@Environment(\.openWindow) var openWindow
var body: some Scene {
WindowGroup(id: "Window") {
if avPlayerViewModel.isPlaying {
AVPlayerView(viewModel: avPlayerViewModel)
} else {
ContentView()
.environment(appModel)
}
}
ImmersiveSpace(id: appModel.immersiveSpaceID) {
ImmersiveView()
.environment(appModel)
.onAppear {
appModel.immersiveSpaceState = .open
avPlayerViewModel.play()
openWindow(id: "Window")
}
.onDisappear {
appModel.immersiveSpaceState = .closed
avPlayerViewModel.reset()
}
}
.immersionStyle(selection: .constant(.mixed), in: .mixed)
}
}
For the Artists scene example you also have to change the info.plist settings and set the immersionStyle to .mixed. Then, in the ImmersiveView file just add a sphere that would act like a sky sphere
RealityView { content in
// Add the initial RealityKit content.
if let immersiveContentEntity = try? await Entity(named: "ArtistWorkflowExample", in: realityKitContentBundle) {
content.add(immersiveContentEntity)
}
var material = SimpleMaterial(color: .blue, isMetallic: false)
material.faceCulling = .front
let skybox = ModelEntity(mesh: .generateSphere(radius: 500),
materials: [material])
content.add(skybox)
}