1

There is a web page that scans qr codes via a camera.

It works beautifully in iphone's safari browser but in a webview or wkwebview it does not.

I do not own or control js code, so its hard to tell what it requests. Application itself has all the required permissions for camera - it also has its native qr scanner that works fine.

SFSafariViewController feels like an overkill and yet I did not manage to present it in a way that shows non blank screen. WebView's delegate methods are not called when camera is requested by a web page... I am aware of solutions that require to manually open camera on redirect and then pass back content to javascript, but I was expecting everything to work out of the box...

Michael Kemmerzell
  • 4,802
  • 4
  • 27
  • 43
Ivan
  • 1,320
  • 16
  • 26
  • Possible duplicate? https://stackoverflow.com/a/43945157/4048853 – Derek Feb 11 '19 at 16:01
  • If you don't control the JS code, but can control the app, create the scanner in native code instead. Pass whatever you scan to the JS, if you can. – Derek Feb 11 '19 at 16:04

0 Answers0