-
Notifications
You must be signed in to change notification settings - Fork 706
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
iOS 15.4 - Xamarin.iOS - Crash when scanning with AVCaptureEngine #1035
Comments
I also got this, and the a workaround would be to explicitly set the
I don't know what the solution would be, since the crash happens inside |
I had a similar problem (not using ZXing but rather iOS built-in scanning) with the same error message (Codabar has no associated enum value on this platform) but I could solve it by simply rebuilding the application with the latest version of Xamarin.iOS (15.8). |
Thanks for the update! It seems the Xamarin.iOS - Xcode 13.3 update added some other barcodes with AVFoundation as well: |
Thank you all for your quick replies. To overcome this issue, I stopped using the AVCaptureEngine through the scan(bool useAVCaptureEngine) method. To your knowledge, is there any downside to not use the AVCaptureEngine through the scan(bool useAVCaptureEngine) method? |
I have the impression that the AVCaptureEngine is faster than the ZXing library when specifying all barcodes, so I try to continue using it. |
I'm using this library on an Xamarin Forms 5 app and everything works fine on Android. But if I connect my iPhone Xs to my PC via USB for debug, it doesn't scan at all. It simply doesn't do anything! I then packaged the app for TestFlight testing and installed it on my iPhone Xs, and it crashed the whole app. Here's my SO question about this issue: https://stackoverflow.com/questions/71977226/zxing-scanner-not-scanning-on-ios-in-xamarin-forms-app Does anyone have a solution for this issue? |
Hello.
Once I updated my device to iOS 15.4, I get the following runtime exception when trying to scan using the AVCaptureEngine.
I use the latest available stable version 2.4.1.
System.Exception: System.NotSupportedException: Codabar has no associated enum value on this platform.
at AVFoundation.AVMetadataObjectTypeExtensions.GetValue (Foundation.NSString constant) [0x0015b] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/ios/native/AVFoundation/AVMetadataObjectType.g.cs:420
at AVFoundation.AVMetadataObject.ArrayToEnum (Foundation.NSString[] arr) [0x00016] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/AVFoundation/AVMetadataObject.cs:51
at AVFoundation.AVCaptureMetadataOutput.get_AvailableMetadataObjectTypes () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/AVFoundation/AVCaptureMetadataOutput.cs:39
at ZXing.Mobile.AVCaptureScannerView.SetupCaptureSession () [0x0041b] in <04e0b9ffeac840b494808f043a3ab5ba>:0
at ZXing.Mobile.AVCaptureScannerView.b__36_0 () [0x00001] in <04e0b9ffeac840b494808f043a3ab5ba>:0
at Foundation.NSActionDispatcher.Apply () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSAction.cs:62
at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend_IntPtr_IntPtr_bool(intptr,intptr,intptr,intptr,bool)
at Foundation.NSObject.InvokeOnMainThread (System.Action action) [0x00007] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/Foundation/NSObject2.cs:619
at ZXing.Mobile.AVCaptureScannerView.StartScanning (System.Action`1[T] scanResultHandler, ZXing.Mobile.MobileBarcodeScanningOptions options) [0x00047] in <04e0b9ffeac840b494808f043a3ab5ba>:0
at ZXing.Mobile.AVCaptureScannerViewController.ViewDidAppear (System.Boolean animated) [0x0006a] in <04e0b9ffeac840b494808f043a3ab5ba>:0
at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
The text was updated successfully, but these errors were encountered: