Skip to content

On iOS WebView, instead of scanning, the camera opens as a live stream without detecting QR/barcodes. #591

@vsarangan

Description

@vsarangan

Describe the bug
When running inside an iOS WebView (e.g., an app using WKWebView), the scanner does not detect any codes. Instead, it only shows the live camera stream.

To Reproduce
Steps to reproduce the behavior:

  1. Integrate @zxing/ngx-scanner into an Angular app
  2. Open the app inside an iOS WebView (Native)
  3. Try scanning a QR code.
  4. Observe that only the live stream appears — scanning does not work.

Expected behavior
The scanner should behave the same way as in Safari iOS: detect QR codes / barcodes instead of just showing the camera preview.

Environment
Version: (please specify your version, e.g. 20.0.0)
Device: iPhone (iOS version, e.g. iOS 17.7.1)
Browser: iOS WebView (WKWebView / UIWebView)
Works on: Safari iOS
Fails on: iOS WebView

Works fine in Safari iOS.
Issue only in iOS WebView.
Tested different permissions and facing mode, but no change.

https://zxing-js.github.io/ngx-scanner/ - Even tried the demo url same observed

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions