Why is a RealityView inside an ImmersiveSpace bound by what seems to be a Window?

I have an app that launches into an immersive space with a mixed immersion style.

It appears like the Reality View has bounds that resemble a window. I would expect the bounds to not exist because it's an ImmersiveSpace.

Why do they exist? And how can I remove these?

This is the entire code:

@main
struct RealityKitDebugViewApp: App {
    var body: some Scene {
        ImmersiveSpace {
            ContentView()
        }
    }
}
struct ContentView: View {
    
    @State var logMessages = [String]()
    
    var body: some View {
        RealityView { content, attachements in
            let root = Entity()
            content.add(root)
            
            guard let debugView = attachements.entity(for: "entity_debug_view") else { return }
            debugView.position = [0, 0, 0]
            root.addChild(debugView)
        } update: { content, attachements in
        } attachments: {
            Color.blue
                .tag("entity_debug_view")
        }
        .onAppear(perform: {
            self.logMessages.append("Hello World")
        })
    }
}

Hello, something is amiss here. The screenshot appears to show a window, not an ImmersiveSpace. Do you have a full example project that reproduces the issue?

@gchiste Yes I do, I actually filed bug report using feedback assistant.

https://feedbackassistant.apple.com/feedback/12738709

Hi @tvg_123 ,

Coming back to this, I believe what is happening here is that your Info.plist is not properly configured. The logs you see on the Console produced by your app should give you a hint about this.

By default, your app is given a regular window scene (WindowGroup) at application launch time. In your case though, you seem to want your app to start with an ImmersiveSpace scene instead. The system need to be told give your app an Immersive Space at launch via your app's Info.plist. Here is an excerpt of how the configuration of the scene manifest in your Info.plist could look like in order for your app to launch directly with an Immersive Space using the .mixed immersion style (make sure the hierarchy of keys and values in the dictionary is right):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>

    ...

    <key>UIApplicationSceneManifest</key>
    <dict>
        <key>UISceneConfigurations</key>
        <dict>
            <key>UISceneSessionRoleImmersiveSpaceApplication</key>
            <array>
                <dict>
                    <key>UISceneInitialImmersionStyle</key>
                    <string>UIImmersionStyleMixed</string>
                </dict>
            </array>
        </dict>
        <key>UIApplicationPreferredDefaultSceneSessionRole</key>
        <string>UISceneSessionRoleImmersiveSpaceApplication</string>
        <key>UIApplicationSupportsMultipleScenes</key>
        <true/>
    </dict>

    ...

Tip: You can view your Info.plist's content in Xcode as plain-text source code by right-clicking it in the Project Navigator and choosing "Open As > Source Code".

Why is a RealityView inside an ImmersiveSpace bound by what seems to be a Window?
 
 
Q