Skip to content

Latest Version is not Working in Xamarin.Form for iOS #576

Description

@dharamhbtik

Latest version is not working in the XAMARIN.FORMS project. When Placed barcode in front of the camera then nothing happens. Below is my code :
` var scanPage = new ZXing.Mobile.MobileBarcodeScanner();

        scanPage.TopText = "Place the barcode between the red line";
        scanPage.CameraUnsupportedMessage = "Camera doesnt supports AUTOFOCUS.";
        scanPage.BottomText = "If it it is not scanning, turn FLASH on";
        scanPage.CancelButtonText = "<< Back";
        scanPage.FlashButtonText = "Toggle Flash";
        scanPage.UseCustomOverlay = false;
        scanPage.AutoFocus();
        ZXing.Result result = null;
        result = await scanPage.Scan(new MobileBarcodeScanningOptions
        {
            TryHarder = false,
            AutoRotate = false,
            UseNativeScanning = true,
            PossibleFormats = GetAvailableFormats(),
        });
        if (result != null && !string.IsNullOrWhiteSpace(result.Text))
        {
            await ProcessResult(result.Text);
        }`

The same code is working fine with good scanning speed for Windows and Android.

I have downgraded the version then it starts working but it is takes lot of time to detect the barcode. When I turn Flash on then it detects easily.

What I need to change to make it work in iOS like it is working in other platforms?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions