Loading Barcode plugin in Phonegap using Plugman

cordova, phonegap-plugins

Solution

I had this issue, I solved it attaching `<plugins></plugins>` above `</widget>` in my `config.xml`. But this sounds as a temporary solution as `plugins` tag seems to be deprecated in new releases (to be confirmed, the documentation is really bad)...

Problem

Just starting up with PhoneGaps command line interface and it new Plugman command. Here are the calls I am making to create my project ``` Alex-Britez-MBP:barcodeApp abritez$ phonegap create /Users/abritez/Documents/Projects/phonegap/barcodeApp --name "barcodeApp" --id "com.company.barcodeApp" ``` With response ``` phonegap created project at /Users/abritez/Documents/Projects/phonegap/barcodeApp ``` I then attempt to load the plugin downloaded from (https://github.com/wildabeast/BarcodeScanner) ``` Alex-Britez-MBP:barcodeApp abritez$ plugman --platform ios --project /Users/abritez/Documents/Projects/phonegap/barcodeApp/platforms/ios --plugin /Users/abritez/Documents/Projects/phonegap/_plugins/barcodeReader ``` I get the following error on the terminal ``` grafting xml at selector "plugins" from "/Users/abritez/Documents/Projects/phonegap/barcodeApp/platforms/ios/barcodeApp/config.xml" during config install went bad :( ``` I checked the directory and it seemed like files where successfully added, but running the application fails in both Simulator and on device. Any ideas where I am going wrong? Update: I did notice that in plugin.xml there was a line which stated ``` <config-file target="config.xml" parent="plugins"> <plugin name="BarcodeScanner" value="CDVBarcodeScanner"/> </config-file> ``` I see 2 plugin folders one in cordova.plugin and the other on the top level. Curious if this is the issue. Another interesting thing i noticed is how the directories where created by PlugMan. This doesn't seem like it is correct. Screenshot here:

Original source