-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iPhone 14 Pro Minimum Focus Distance Scanning Issues #68
Comments
For anyone looking for a fix to this issue, I'm currently testing the following change in CameraPreview.swift In SetupCamera() and setCamera(), add .builtInUltraWideCamera to the array. So far in testing this uses the macro lens on iPhone 14 and on iPhoneSE2 the main (and only) camera will still be found and no errors are produced. I'll continue testing on various devices before submitting a PR. let deviceDiscoverySession = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInUltraWideCamera, .builtInWideAngleCamera], mediaType: AVMediaType.video, position: cameraPosition) |
After more testing, I discovered that the iPhone 13 will provide the Ultra Wide lens as well but it is significantly poorer quality resulting in a worse scanning situation. Given that, I'm testing the following solution to ONLY provide UltraWide to iPhone 14 Pro. provide this function somewhere CameraPreview can access it.
Then in CameraPreview.swift in func setupCamera() The performance on macOS is still poor even with Catalyst enabled, but it's functional just not fast. |
Sorry I only have an iPhone 12 |
Hey! Any update on this? |
In CameraPreview, under setupCamera() I added the following lines to test for MacCatalyst and if not then to use this array of camera options. It's still slow to launch in Catalyst but it does work on the Mac and the new camera options work for my 14Pro and 13 test devices.
|
Hello everyone I run my own startup and over the past year I have worked very hard to make my startup a success. You all can send PR to this project. I'm sorry again for being gone for a long time. |
The minimum focus distance on the default camera in the iPhone 14Pro has changed and can result in barcodes that are too far away to successfully scan. This Apple Developer forum thread links to a 2021 WWDC session and sample code for addressing this issue.
The text was updated successfully, but these errors were encountered: