html5-qrcode icon indicating copy to clipboard operation
html5-qrcode copied to clipboard

scanning not working on any Iphone device

Open hraza111 opened this issue 3 years ago • 6 comments

Hello, I have used your library and use same code. it works perfect on PC and android devices but not working in iphone mobiles with any version. Thanks in advance

hraza111 avatar Mar 29 '22 10:03 hraza111

I had the same issue, but I could fix it by messing with my HTTPS setting. Now running fine with Blazor Webassembly and Nginx with iPad and iPhone

drvolcano avatar Apr 05 '22 15:04 drvolcano

I had the same issue, but I could fix it by messing with my HTTPS setting. Now running fine with Blazor Webassembly and Nginx with iPad and iPhone

Can you explain how you set this up? Thanks!

erikmillergalow avatar Apr 05 '22 22:04 erikmillergalow

Can you explain how you set this up? Thanks!

Still trying to figure out, how to get everything else running, so I sadfully dont have a 100% working recipe right now. I used both tutorials here as a start, maybe this helps https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-6.0 https://www.codeproject.com/Articles/5269965/Deploying-Blazor-Server-side-to-the-Linux-Distro-U

drvolcano avatar Apr 06 '22 10:04 drvolcano

Here as sample config of my NGINX, works fine for me, but use it at your own risk:

sudo nano /etc/nginx/sites-available/default

` server { listen 80; listen [::]:80; server_name stux02;

    add_header X-Frame-Options "SAMEORIGIN";

    location / {
            proxy_pass                      http://localhost:5000;
            proxy_http_version              1.1;
            proxy_set_header                Upgrade $http_upgrade;
            proxy_set_header                Connection keep-alive;
            proxy_set_header                Host $host;
            proxy_cache_bypass              $http_upgrade;
            proxy_set_header                X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header                X-Forwarded-Proto $scheme;
    }

}

server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name stux02;

    ssl_certificate           /etc/ssl/certs/testCert.crt;
    ssl_certificate_key       /etc/ssl/certs/testCert.key;
    ssl_session_timeout       1d;
    ssl_protocols             TLSv1.2 TLSv1.3;
    ssl_prefer_server_ciphers off;
    ssl_ciphers               ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE->
    ssl_session_cache         shared:SSL:10m;
    ssl_session_tickets       off;
    ssl_stapling              off;

    add_header X-Content-Type-Options nosniff;
    add_header X-Frame-Options "SAMEORIGIN";

    location / {
            proxy_pass                      http://localhost:5000;
            proxy_http_version              1.1;
            proxy_set_header                Upgrade $http_upgrade;
            proxy_set_header                Connection keep-alive;
            proxy_set_header                Host $host;
            proxy_cache_bypass              $http_upgrade;
            proxy_set_header                X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header                X-Forwarded-Proto $scheme;
    }

}

`

drvolcano avatar Apr 06 '22 12:04 drvolcano

I have the same issue, I tried three different iOS devices running latest version of iOS 15.x and none can scan any barcode type using either front or back camera with Safari. I can see the viewfinder in the scan area but it never registers/scans. Site has HTTPs but that should not have to do with anything running locally within the browser.

aiso-net avatar Aug 21 '22 03:08 aiso-net

first of all, try the html5qrocodeScanner example witht the required option for mobiles, if it works then you have a code problem for the html5Qrcode class @drvolcano html5Qrcode is a client side application, not server side.... btw I'm using html5-qrcode with an iphone 6s IOS 15.6 everyday scanning thaousands of QR codes...

ROBERT-MCDOWELL avatar Aug 21 '22 11:08 ROBERT-MCDOWELL