nimiq / qr-scanner

Lightweight Javascript QR Code Scanner
https://nimiq.github.io/qr-scanner/demo
MIT License
2.39k stars 521 forks source link

QrScanner.scanImage() doesn't work on ios #189

Open KhanhDuy-123 opened 2 years ago

KhanhDuy-123 commented 2 years ago

On Android device I scan QR image successfully but on IOS it doesn't work. I tried it on the demo but it didn't work. Help me!

CheIIau commented 1 year ago

I fixed the problem by wrapping detailedScanResult promise in scanImage method in try...catch statement. Looks something like this. image I don't know how but it worked for me. Let me know if it works for your case P.S. I don't know why but qr scanner works on ios on my local dev server. But when i upload my app on remote server, scanImage throws an error. Fix above solved the problem for me.