LiDAR Depth Camera of AVFoundation does not work. (on iPad Pro 12.9-inch 4th generation)

I updated to 15.4.1 the system version of iPadPro12.9 4th (Model Number: MXAU2J/A) . And we have built & executed the following projects.

https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/capturing_depth_using_the_lidar_camera

However, there is an exception threw "lidarDeviceUnavailable" and an execution error. (There is place where exceptions throw.) (As a supplement, depth measurement using ARKIT can be performed.)

    // Look up the LiDAR camera.
    guard let device = AVCaptureDevice.default(.builtInLiDARDepthCamera, for: .video, position: .back) else {
        throw ConfigurationError.lidarDeviceUnavailable
    }
    

I also own iPhone13Pro(iOS 15.4.1), and I was able to execute sample code without any problems.

Is the cause of this problem for hardware constraints? Or is it a bug?

In the project I join, iPad Pro 11-inch (2nd Generation) is developed as a target terminal. Can I run a sample code with iPad Pro 11-inch (2nd Generation)?

I was waiting for the depth measurement by AVFoundation using LIDAR sensors. The reason is that I can measure depth with ARKIT, but it was not possible to change the camera exposure.

Thanks.

Post not yet marked as solved Up vote post of yasushi176 Down vote post of yasushi176
472 views

Replies

I met this problem too!!! Anyone can help?

Me2. The same source code works on an iPhone with LiDAR.

As noted in https://developer.apple.com/videos/play/wwdc2022/110429/?time=231, the builtInLiDARDepthCamera device is available on iPhone 12 Pro, iPhone 13 Pro, and iPad Pro (5th Gen).

The model you have described is iPad Pro (4th gen).