Download a barcode plugin to Phonegap using Plugman

Only launch using the PhoneGaps command line interface and the new Plugman command. Here are the calls that I create to create my project

Alex-Britez-MBP:barcodeApp abritez$ phonegap create /Users/abritez/Documents/Projects/phonegap/barcodeApp --name "barcodeApp" --id "com.company.barcodeApp" 

With the answer

  phonegap created project at /Users/abritez/Documents/Projects/phonegap/barcodeApp 

Then I try to download 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 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 looks like the files that were successfully added, but the application launch does not work both in Simulator and on the device.

Any ideas I'm wrong about?

Update: I noticed that in the plugin.xml file there was a line that indicated

 <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 at the top level. Curious if this is a problem.

Another interesting thing I've noticed is how directories are created using PlugMan. It does not look like it is right.

Screenshot: Directory Screenshot

+4
source share
1 answer

I had this problem, I decided to add <plugins></plugins> above </widget> to my config.xml . But this sounds like a workaround, as the plugins tag seems deprecated in new releases (which will be confirmed, the documentation is really bad) ...

+3
source

Source: https://habr.com/ru/post/1492782/


All Articles