Skip to content
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

I am having issue with QR scanning in iOS #92

Open
indra58 opened this issue May 8, 2023 · 2 comments
Open

I am having issue with QR scanning in iOS #92

indra58 opened this issue May 8, 2023 · 2 comments

Comments

@indra58
Copy link

indra58 commented May 8, 2023

This library working fine in android but not working in iOS. And, there is no such issues encountered already and after cloning this library I have verified example app in same devices and got same issue.

Library Version -->> 1.1.2

Test performed in

  1. iPhone 7
  2. iPhone 13 Pro

My implementation

  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("QR Code Scanner")),
      body: Stack(
        children: [
          ReaderWidget(
            isMultiScan: false,
            codeFormat: Format.qrCode,
            showFlashlight: false,
            showGallery: false,
            showToggleCamera: false,
            allowPinchZoom: false,
            onControllerCreated: (controller) async {
              if (controller != null) {
                cameraController = controller;
              }
            },
            scannerOverlay: DynamicScannerOverlay(
                borderColor: Theme.of(context).primaryColor),
            onScan: (result) async {
              await cameraController.pausePreview();
              _showAlertDialog("QR Code \n${result.text}");
            },
          ),
        ],
      ),
    );
  }

There is no such information in logcat regarding issue of not scanning the QR codes

@khoren93
Copy link
Owner

khoren93 commented May 9, 2023

Hello,

I'm pleased to announce that version 1.2.0 is now available. This latest version has been released to address the iOS detection issue that some users have been experiencing.

To temporarily resolve the issue, I've downgraded the image version from v4.0 to v3.0. Please note that this is a temporary fix and a more permanent solution will be provided in the next releases.

If you encounter any issues or have any feedback about the new version, please let me know.

Thank you for your support!

Best regards,
Khoren

@jorg1piano
Copy link

jorg1piano commented May 3, 2024

It seems like there is still an issue on iOS in version 1.5.2.

Scanning the same QR code on android works fine.

image

Qr code saying "Hello world"

  void _onImage(CameraImage image) async {
    Code code = await zx.processCameraImage(image);
    // works on android but on ios isValid is never true and code.text is always an empty string
    print(code);
  }

Running it on a iPhone 14 Pro Max with ios 17.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants