Reading barcode in an ios application in .net8 without maui

68 Views Asked by At

We are using Zxing.net.mobile to read barcode in a Xamarin.iOS application. I get the following error when I debug in iPhone 15 pro. "System.NotSupportedException: "humanFullBody" has no associated enum value on this platform.'"

Anyway we thought of migrating the Xamarin.iOS project to .net 8 SDK. Everything works fine with the migration except the Zxing.net.mobile. System.NotSupportedException: Use the platform specific implementation instead! at ZXing.Mobile.MobileBarcodeScanner.Scan(MobileBarcodeScanningOptions options)

I can't use Zxing.net.maui as its not a maui application. I would like to know how else I can read a barcode in an iOS application in .net 8 that does not use maui.

Update: I still tried adding the zxing.net.maui.controls package. I get the following 3 errors when i try to build.

Error Failed to AOT compile ZXing.Net.MAUI.Controls.dll, the AOT compiler exited with code 1. iOS C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\targets\Xamarin.Shared.Sdk.targets 1214
Error Failed to AOT compile ZXing.Net.MAUI.dll, the AOT compiler exited with code 1. iOS C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\targets\Xamarin.Shared.Sdk.targets 1214
Error Failed to AOT compile aot-instances.dll, the AOT compiler exited with code 1. iOS C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8004\targets\Xamarin.Shared.Sdk.targets 1214

Thanks in advance.

0

There are 0 best solutions below