Ian Jamieson
Ian Jamieson

Reputation: 4826

Installing a PhoneGap plugin - BarcodeScanner

$ phonegap version
3.2.0-0.16.0

I have been through all the documentation and can't find out what is going on here. Steps I have completed so far:

  1. Installed the plugin through Plugman:

    plugman install --platform ios --project platforms/ios/ --plugin https://github.com/phonegap-build/BarcodeScanner.git

    I can now see the plugin installed in /app/dir/platforms/ios/cordova/plugins/com.phonegap.plugins.barcodescanner

  2. Added the plugin code to my config.xml

    <gap:plugin name="com.phonegap.plugins.barcodescanner" />

  3. Tried viewing window.plugins and cordova.plugins in my console after DeviceReady has been fired. Both are undefined

  4. I also tried including the JS in my index.html (which I was sure you don't have to do as this is completed as part of the build process) and then repeated step 3. but no luck.

Upvotes: 2

Views: 7897

Answers (1)

Laurie Clark
Laurie Clark

Reputation: 630

I don't think that the barcodescanner has support for PG 3.2.0 yet, if it has you can check the following. (https://github.com/wildabeast/BarcodeScanner/issues/68)

If plugins are correctly installed they should automatically update your res/xml/config.xml :

<feature name="BarcodeScanner">
<param name="android-package" value="com.phonegap.plugins.barcodescanner.BarcodeScanner" /> </feature>

Check if your plugins are correctly installed by searching for them via plugman search command.

If not, you could try and install the plugin like this :

phonegap local plugin add https://github.com/phonegap-build/BarcodeScanner.git

Upvotes: 1

Related Questions