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.

Answered by ForumsContributor in

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

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

Accepted Answer

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).

iPad Pro 11" 2nd generation Model (MY232NF/A) A2228 on iOS 15.6 has the very same problem.

How does it come that Tech Specs say "LiDAR scanner" under "Sensors" ?

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