You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation says that this method is only available on Android and iOS. Therefore, this is not a bug.
I just updated the documentation of the isSupported method to be more clear about what exactly happens:
Whether the barcode scanner is available or not by checking if the device has a camera.
I think there are arguments for both implementations. Since the plugin does not support the web platform at all, you should not call the plugin on the web. You could simply do it like this:
Plugin(s)
Did you test the latest version?
Platform(s)
Current behavior
BarcodeScanner.isSupported()
results in errorPromise <rejected>: Error: This Barcode Scanner plugin method is not available on this platform.
Expected behavior
BarcodeScanner.isSupported()
returns: Promise<IsSupportedResult> with{supported: false}
as documentation says.Reproduction
https://github.com/LoranRendel/temporary-mlkit-app
Steps to reproduce
npm start
open url
check devtools console
Other information
Promise<IsSupportedResult>
Capacitor doctor
[warn] The bundledWebRuntime configuration option has been deprecated. Can be safely deleted.
Capacitor Doctor
Latest Dependencies:
@capacitor/cli: 5.5.1
@capacitor/core: 5.5.1
@capacitor/android: 5.5.1
@capacitor/ios: 5.5.1
Installed Dependencies:
@capacitor/android: not installed
@capacitor/ios: not installed
@capacitor/core: 5.5.1
@capacitor/cli: 5.5.1
Before submitting
The text was updated successfully, but these errors were encountered: