Closed anndyd closed 1 year ago
You probably have a dom element that is not transparent, and thus blocks the view. You can determine which element it is by attaching a Safari web inspector to your app while it's running on the iPad. Important to remember is that the camera feed is displayed behind the webview.
JanMisker, thanks a lot! For my environment, I set {visibility: hidden; --bs-body-bg: transparent;} for html or body, it works!
I saw it only add style: background: transparent; to html DOM after starting the scanner, it is not enough for Angular project. Could add more settings for adapting more frameworks? This issue could be closed if you think it is not a bug.
@anndyd the problem why this is "not properly" documented is, that there are millions possible configurations. In your example the issue is most likely not Angular itself, since Angular won't really apply any styles by default. I am pretty sure the variable --bs-body-bg
, which seems to be a bootstrap-variable, is causing issues on your end.
This means that any external css applied, and the order of which they are applied, might cause issues. This makes it basically impossible to document...
I will close this issue for now since your specific problem seems to be resolved :)
Describe the bug I installed the plugin and configured followed the instruction. The camera can open and get scan result. But the scanner view does not show up.
To Reproduce Steps to reproduce the behavior:
startScan = async () => { await BarcodeScanner.checkPermission({ force: true }); BarcodeScanner.hideBackground(); const res = await BarcodeScanner.startScan(); if (res.hasContent) { console.log(res.content); } };
Expected behavior After click the scan button/icon, the scanner/camera view should show up to indicate what it scanning when the scanner is running.
Screenshots N/A
Version Angular: 15.1.5 Material: 15.1.5 "@capacitor/angular": "^2.0.3", "@capacitor/core": "latest", "@capacitor/ios": "^4.6.1", "@capacitor/cli": "latest", "typescript": "^4.8.4" Xcode: 14.2 iPad: iPad Air 5th generation, iPadOS 16.1.1(20B101) macOS Monterey 12.6.2 Intel
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context tried all steps of the "Troubleshooting", but not lucky