Phonegap plugin barcodescanner crashes on iOs
<p>For a project I am working on there has to be a way to scan QR-Codes. I've got this one from the <a href="https://github.com/phonegap/phonegap-plugin-barcodescanner" rel="nofollow">phonegap-plugin-barcodescanner</a>. As is, it works well on Android, never had any problems. </p>

<p>But on iOs it will crash as is. You will get a request to use the camera, and then the app crashes. The way I found around this is to remove the options part of it, then it works.</p>

<p>This looks like a bit of a strange way to solve it. <strong>Question: is there a better way to solve this?</strong></p>

<pre><code>cordova.plugins.barcodeScanner.scan(
  function (result) {
      alert("We got a barcode\n" +
            "Result: " + result.text + "\n" +
            "Format: " + result.format + "\n" +
            "Cancelled: " + result.cancelled);
  },
  function (error) {
      alert("Scanning failed: " + error);
  },
  {
      "preferFrontCamera" : true, // iOS and Android
      "showFlipCameraButton" : true, // iOS and Android
      "prompt" : "Place a barcode inside the scan area", // supported on Android only
      "formats" : "QR_CODE,PDF_417", // default: all but PDF_417 and RSS_EXPANDED
      "orientation" : "landscape" // Android only (portrait|landscape), default unset so it rotates with the device
  }
);
</code></pre>

<p>Using: Windows 10, Intel XDK v3619, Cordova CLI 6.2.0 and phonegap-plugin-barcodescanner 4.1.0</p>