I have an ARKit application where I need to get the capturedImage
of the current ARFrame
object and use it for further processing. My code looks roughly like this:
guard let frame = sceneView.session.currentFrame else {
return
}
someMethod(frame)
Now, I expect the frame to be nil
only during the first few miliseconds of the application where ARKit is being set up, or if the camera permission is denied for this application. However, when the application is first installed and I deny permission when asked, I get non-nil frames where every pixel is just black. If I run the application again, I get nil
frames as I should. Is this a bug or is there a logic behind this?