I am developing pdf417 barcodescanner in phonegap. I tested in android mobile. Its working like a charm, but when I tested it in IOS ,I am not getting any error,but not calling pdf417scanner in IOS. I added CDVpdf417.h,CDVpdf417.m plugins and added <plugin name="CDVpdf417" value="CDVpdf417" />
,
config.xml:
<feature name="Pdf417Scanner">
<param name="ios-package" value="CDVpdf417" />
</feature> .
index.js:
scanButton.addEventListener('click', function() {
var scanner = cordova.require("cordova/plugin/Pdf417Scanner");
//cordova.plugins.pdf417Scanner.scan(
scanner.scan(
// Register the callback handler
function callback(data) {
alert("got result " + data.data + " type " + data.type);
if (data.cancelled == true) {
resultDiv.innerHTML = "Cancelled!";
} else if (data.resultList && data.resultList.length > 1) {
// More than 1 element in results
resultDiv.innerHTML = data.resultList.length + " results";
} else {
resultDiv.innerHTML = "Data: " + data.data + " (raw: " + hex2a(data.raw) + ") (Type: " + data.type + ")";
}
},
// Register the errorHandler
function errorHandler(err) {
alert('Error');
},
[ ["PDF417", "QR Code"], true ] //We want qr codes and pdf417 scanned with the beep sound on
);
});
can you tell me where I am doing wrong here.