A starting point could be the CameraViewController#setRecommendedZoomFactor method in the example project. But I am not sure if this is what makes the difference / there might be something else that improves the rate of recognition here – the example project doesn't use CIDetector at all.
Unfortunately I have no more time to investigate this further, the solution for my client will probably be "print bigger QR codes", just wanted to document our findings here.
The Apple example project AVCamBarcode (https://developer.apple.com/documentation/avfoundation/capture_setup/avcambarcode_detecting_barcodes_and_faces) seems to do a few tricks to improve recognition of QR codes and seems to recognize small codes significantly better than CodeScanner.
A starting point could be the
CameraViewController#setRecommendedZoomFactor
method in the example project. But I am not sure if this is what makes the difference / there might be something else that improves the rate of recognition here – the example project doesn't use CIDetector at all.Unfortunately I have no more time to investigate this further, the solution for my client will probably be "print bigger QR codes", just wanted to document our findings here.