Redth / ZXing.Net.Mobile

Barcode Scanner for Xamarin.iOS, Xamarin.Android, UWP and Tizen

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does Not Run in iOS?

mark-sheldon opened this issue · comments

Does not seem to run in iOS, but runs fine in Android. Do you anticipate a fix for the issue any time soon? Test Code:

    private async void BtnGoToScanner_Clicked(object sender, EventArgs e)
    {
        try
        {
            var overlay = new ZXingDefaultOverlay
            {
                TopText = "QR code will be scanned automatically",
                BottomText = "Align the QR code within the frame"
            };
            MobileBarcodeScanningOptions options = new MobileBarcodeScanningOptions();
            options.AutoRotate = true;
            options.TryHarder = false;
            options.UseNativeScanning = true;
            ZXingScannerPage scanPage = new ZXingScannerPage(options, overlay);                

            await Navigation.PushAsync(scanPage);

            scanPage.OnScanResult += async (result) =>
            {
                await Navigation.PopAsync();
                await DisplayAlert("Scanned Value", result.Text, "OK");
            };
       
        }
        catch
        {

        }
    }

@mark-sheldon which iPhone model are you testing with?

Just added the NuGet packages
https://www.nuget.org/packages/g0dpain.ZXing.Net.Mobile/
https://www.nuget.org/packages/g0dpain.ZXing.Net.Mobile.Forms/

Those arent tested for older iPhone models but the scan works for me now perfectly on iPhone 12 and iPhone 13 Pro.
You can find it under the preview section