question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use in Cordova App on iOS

See original GitHub issue

In relation to #167 and #210 I’m trying to get the zxing-js library working with Cordova on iOS. Thanks to the related issues, it is working on Android. I guess it’s the same problem that was with Android. Which is it doesn’t has permissions for the camera.

I have just a blank page with the plugin on it. I get the following error: ERROR: {"line":2,"column":28352,"sourceURL":"..../zxing-umd.js"} Which reads: throw new Error("Can't enumerate devices, method not supported."); As said, i think this is because of no camera permissions.

I tried installing the barcodescanner with no result.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pj035commented, Jul 8, 2020

We’re having the same problem. It’s a known limitation because of missing WebRTC support in the WkWebView (hopefully this changes soon). Anyhow, there is cordova-plugin-iosrtc, which provides an implementation of WebRTC. We tried that out and only succeeded partially. The camera loads and is visible, but the scanSuccess (nor error) event aren’t triggered.

0reactions
odahcamcommented, Feb 9, 2021

Just as an update, latest iOS version seem to support the WebRTC API needed for this component to work. I didn’t test it yet, but it’s good news already.

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS Platform Guide - Apache Cordova
This guide shows how to set up your SDK development environment to deploy Cordova apps for iOS devices such as iPhone and iPad,...
Read more >
How to Release Your Cordova App for iOS and Android
Prerequisites · Build a deployable iOS project · Open the project in Xcode · Finally, sign and publish your app on the App...
Read more >
Cordova iOS Application Development Explained from Setup ...
Cordova build command converts our app code to an xcode project. Using Xcode we create an .ipa file which is the actual app...
Read more >
Apache Cordova iOS - GitHub
Cordova iOS is an iOS application library that allows for Cordova-based projects to be built for the iOS Platform. Cordova based applications are, ......
Read more >
cordova-ios - npm
Cordova iOS is an iOS application library that allows for Cordova-based projects to be built for the iOS Platform.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found