At this point, the app runs as expected. So I then go to add some JS code to use the plugin. I'm adding this code to the tap handler in the controller (both of which are auto-generated as part of the MVC template).

The code I'm adding is a copy of that in the plugin's documentation:

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

}

);

However, nothing happens when the button is tapped and I'm not sure where to go from here. I appear to be doing everything by-the-book, but without any luck.

I removed everything to do with Sencha and Cmd from my system and removed any PATH entries that related to these. Then reinstalled from scratch and it all seems to work.

The only wrinkle is that I cannot build within Architect. If I try to perform any device-related builds (simulate on Android, iOS or build iOS/Android app), I get the following in Architect's 'Output' tab:

[INF] -cordova-platform-add:
[ERR] The following error occurred while executing this line:/Users/chris/Dropbox/STest/.sencha/app/build-impl.xml:422:
The following error occurred while executing this line:/Users/chris/Dropbox/STest/.sencha/app/cordova-impl.xml:137:
The following error occurred while executing this line:jar:file:/Users/chris/bin/Sencha/Cmd/4.0.2.67/sencha.jar!/com/sencha/ant/antlib.xml:616: shellscript returned: 127

...but running 'sencha app build native' from the command line appears to work fine. Annoying, but it'll do for the moment.