Barcode Scanner

Barcode Scanning support for IOS 7+
platforms: ios
$ cordova plugin add com.gtech.cadence.barcodescanner


iOS 7+ BarcodeScanner for Cordova.

Using the plugin

The plugin creates the object window.plugins.barcodeScanner with the method scan(success, fail).


Automatically (CLI)

$ cordova plugin add
$ cordova prepare

success and fail are callback functions. Success is passed an object with data, type and cancelled properties. Data is the text representation of the barcode data, type is the type of barcode detected and cancelled is whether or not the user cancelled the scan.

An example could be:

      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);