iOS 17 Object Capture breaks RealityKit occlusion

I believe that ObjectCaptureView from iOS 17 is causing an issue that breaks RealityKit occlusion.

The following code is a minimal reproducible example of the issue, as follows:

  1. load app, and notice that yellow box will be occluded by the real environment as you move your phone around
  2. press Switch button in center of screen to go to ObjectCaptureView
  3. ObjectCaptureView will open (notice the square in middle of screen)
  4. press Switch button in center of screen - go back to RealityKit view
  5. notice that box is no longer occluded by environment as you move around

I cannot understand why this is happening, I do nothing except .Start() and .Cancel() the Object Capture Session, but if you remove both Start() and Cancel() the issue still presents. The issue seems to only occur when you call ObjectCaptureView() somewhere in your code.

I have logged a bug with Apple but would really like any feedback - thanks.
iOS 17 Object Capture breaks RealityKit occlusion
 
 
Q