Skip to content

iOS 15 Cannot Detect QRCode !!!! #280

Description

@Nakinthorn

After my team update iOS 15
when open the camera to scan QR Code
it not detect anything.....

i found some solution in other issue thread is advise to config Safari browser...
but it not a solution!!!!!
When my app publish i cannot tell every user to config their Safari browser

So, if anyone was found this issue before pls help

Thank...

Activity

  1. DarrylIdle commented on Oct 19, 2021

    @DarrylIdle

    I found that turning the phone landscape fixed the issue for me (may not be the situation for others). I think instascan is analyzing a squished frame/image that it can't recognize.

    There might also be some combinations of experimental settings in Safari that could fix it but I haven't the time to screw around with it.

  2. huangsong commented on Nov 23, 2021

    @huangsong

    edit scanner.js

        analyze() {
            if (!this.video.videoWidth) {
              return null;
            }
        
            //if (!this.imageBuffer) {
              let videoWidth = this.video.videoWidth;
              let videoHeight = this.video.videoHeight;
        
              this.sensorWidth = videoWidth;
              this.sensorHeight = videoHeight;
              this.sensorLeft = Math.floor((videoWidth / 2) - (this.sensorWidth / 2));
              this.sensorTop = Math.floor((videoHeight / 2) - (this.sensorHeight / 2));
        
              this.canvas.width = this.sensorWidth;
              this.canvas.height = this.sensorHeight;
        
              this.canvasContext = this.canvas.getContext('2d');
              this.imageBuffer = ZXing._resize(this.sensorWidth, this.sensorHeight);
              //return null;
            //}
    
    

    fix this bug.

  3. yuresko commented on Dec 13, 2021

    @yuresko

    @huangsong did your snippit resolve it? for me it still only defaults to landscape.

  4. RileyIsOnGitHub commented on Dec 14, 2021

    @RileyIsOnGitHub

    @yuresko let me know if this resolves your issue. I had no luck when trying it.

    I'm hoping to hear back from @huangsong regarding my issue I posted yesterday that you responded to. Hopefully he'll be able help.

  5. huangsong commented on Dec 19, 2021

    @huangsong

    @yuresko here is my test code. https://github.com/huangsong/instascan/tree/master/docs it work well on my test phone (iphone7p ios 15. 、ipadmin5 12.2, android 12 pixel3),I used the modification and compilation of the code of the master branch

  6. sandervanschaik commented on Mar 2, 2022

    @sandervanschaik

    @huangsong ... I had the same problem and found this issue via Google. I tried your solution, but it is not working on IOS 15.3.1 (Ipad Air and Iphone8). It remains only working in landscape and not in portrait.

    Another bug is the front camera is working, the back camera is not working on both my IOS devices. But maybe I have to put this in another 'issue'.

  7. agusbrand commented on Mar 24, 2022

    @agusbrand

    Worked like a charm ✨ Thanks @huangsong !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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