Open pbergner opened 7 years ago
@pbergner I gave this a try today and I could not reproduce the problem. The permission dialog overlays the barcode scanner for me then once I accept I can scan barcodes. Can you give us some more details on how to reproduce?
Looks like this one you closed as can not reproduce https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/327
I couldn't reproduce neither, for me it works as @macdonst said, the permission already overlays the scanner.
Are you using WKWebView plugin?
@jcesarmobile Yes, I believe I am using WKWebView. I was able to workaround the issue by using the cordova diagnostic plugin to request camera authorization and then launch the scanner in the callback.
Try with this : <meta http-equiv="Content-Security-Policy" content="default-src * gap://ready file:; style-src 'self' 'unsafe-inline'; img-src 'self' data:; script-src * 'unsafe-inline' 'unsafe-eval'">
It is a permission issue.
Hey @LioH I was facing a weird problem with the camera opening and your solution fixed it too!
Just for you guys to know: on iOS the camera was opening only after one of these three situations: 1 - the app goes to background and then goes back to foreground 2 - I open and close the notification center (swipe down from the top of the screen) 3 - I open and close the control center (swipe up from the bottom of the screen)
It doesn't sounds like a permission issue, but for some reason the "gap://ready file:;" part of the meta solved it.
Expected Behaviour
Actual Behaviour
CDVBarcodeScanner.mm
LN511
, and accept camera permission before continuing execution, everything works correctly and the camera opens.Steps to Reproduce
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
iOS only
Cordova CLI version and cordova platform version
Plugin version
6.0.5
Sample Code that illustrates the problem
I don't believe this illustrates the problem but here's how I'm opening the scanner. In the failing scenario described above the callbacks are never fired. It appears that the callbacks aren't fired in the Obj. C code either:
Logs taken while reproducing problem
I don't know Objective C but I didn't see any relevant logs