iOS 17 ObjectCaptureSession beginNewScanPassAfterFlip

I am trying to get an implementation of Object Capture using ObjectCaptureSession in iOS 17.

I have been following the example supplied by Apple, but I cannot get the session object to be in the correct state to allow ObjectCaptureSession::beginNewScanPassAfterFlip() to be called.

I get the following error when I call session.beginNewScanPassAfterFlip()

Can't beginNewScanPassAfterFlip() from state == capturing  Must be .paused from .capturing

To start with, there is no state of ObjectCaptureSession which is .paused , so is this talking about .isPaused?

I have tried using session.pause() and confirm that it is paused using .isPaused but I get the same error as above.

I have checked the output of session.state, and confirm it is .capturing

I have put print statements in the example, and confirm that before session.beginNewScanPassAfterFlip() is called at line 104 of OnboardingButtonView the state is .capturing

This goes against the documentation in this page: https://developer.apple.com/documentation/realitykit/objectcapturesession/beginnewscanpassafterflip()

Note, I have also tried pausing the session and calling beginNewScanPassAfterFlip() but this results in the warning:

I am hoping for some clarification if there is something I am missing?