Camera macro control

Hi everyone,

I’m trying to use builtinDualWideCamera. However, I’m seeing the “macro camera issue” when shooting the closer object. The lens will be automatically switched. I see users can solve it with “macro control” in settings for the system camera. I wonder is there a similar API that developers can use to disable the automatic lens switching? Thanks!

Yes there is API

 videoCaptureDevice.videoZoomFactor = videoZoomFactor
 videoCaptureDevice.setPrimaryConstituentDeviceSwitchingBehavior(.locked, restrictedSwitchingBehaviorConditions: [])

Hello, I used AVCaptureDeviceTypeBuiltInDualCamera, but the issue I encountered is that the camera does not automatically switch when I am very close to the object being photographed. Can you tell me how you implemented the automatic switching?

Camera macro control
 
 
Q