phonegap/phonegap-plugins — Issue #344: Error in success callback. BarcodeScanner & iOS
Author: bmcorum
Created: 2012-01-31 21:23:04+00:00
State: open

I followed every step to the letter for setting up the barcodescanner plugin for ios, and am using xcode 4. Upon the scanner picking up a barcode I recieve the error message

Error in success callback: com.barcodeScanner = TypeError: 'undefined' is not a function

In my main.js I have the method

function scan_barcode() {
window.plugins.barcodeScanner.scan(function(result) {
alert("Got a barcode: " + result);
}, function(error) {
alert("Scanning failed");
}
);
}

What do I need to check and/or fix?