visionOS
Immersive scene phases
Observing the ScenePhase in the environment has demonstrated to be a far more reliable technique for determining if an ImmersiveSpace is active or not. This is particularly helpful for making accessibility announcements, as it allows the user to adjust to the context switch. import SwiftUI @main struct ImmersiveScenePhaseApp: App { @Environment(