When using the front camera in iOS, closing the form will cause an application crash with the following stack trace:
Foundation.MonoTouchException Message=Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[AVCaptureDevice setFocusMode:] Unsupported focusMode - use -isFocusModeSupported: to discover valid focus modes
To reproduce the error on the latest master commit (f8abca8) I did the following
- In Sample.Forms.HomePage.cs, add code to make the "Scan with Default Overlay" use the front camera on line 31
new ZXing.Mobile.MobileBarcodeScanningOptions { UseFrontCameraIfAvailable = true }
- Click the "Scan with Default Overlay" button to open the scanner.
- Click the "< ZXing.Net.Mobile" back button to close the scanner.
I've attached the full error in case it helps: Foundation.MonoTouchException.txt.
Tested with iPad (8th generation) on iOS 14.4
When using the front camera in iOS, closing the form will cause an application crash with the following stack trace:
Foundation.MonoTouchException Message=Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[AVCaptureDevice setFocusMode:] Unsupported focusMode - use -isFocusModeSupported: to discover valid focus modesTo reproduce the error on the latest master commit (f8abca8) I did the following
new ZXing.Mobile.MobileBarcodeScanningOptions { UseFrontCameraIfAvailable = true }I've attached the full error in case it helps: Foundation.MonoTouchException.txt.
Tested with iPad (8th generation) on iOS 14.4