BarcodeScanner
BarcodeScanner copied to clipboard
Alert in Scan() function hangs the application on iOS7
I use Barcode Scanner for iOS 7. It hangs the application if I put an alert in scan() function. I use:
Platform: iOS7 Build: Cordova 4.0.0 Barcodes: Code 39
Any Suggestions.
Try using a setTimeout, I seem to recall this helping others with this issue. i.e.
setTimeout(function() {
alert('blah');
});
This same thing happened to me causing the iPad2 to become partially unresponsive (unable to open apps or access the running apps view to close my Cordova app). I was forced to reboot the iPad to recover.
Seems like putting an alert() in the scan result function is a common quick and dirty way to test something and the barcode plugin should not lock up. If there is a technical reason why this cannot be fixed, it needs to be well documented on what you can or cannot do in the scan result function.
Platform: iOS 8.1.1 on iPad2 Build: Cordova 4.1.2
+1