Question

I have just begin with phonegap and I am trying to install the barcode plugin for iOS, following the official documentation. However when adding the plugin with cordova, some files are not found.

I am working with iOS 7 on Mavericks with phonegap and cordova version 3.4.

Thanks!

$ phonegap create barcode com.ramon.barcode BarCode
[phonegap] missing library com.ramon.barcode/www/3.4.0
[phonegap] downloading https://github.com/phonegap/phonegap-app-hello-world/archive/3.4.0.tar.gz...
[phonegap] the options /Users/mingot/Downloads/prova/barcode com.ramon.barcode BarCode
[phonegap] created project at /Users/mingot/Downloads/prova/barcode
$ cd barcode/
$ cordova platform add ios
Creating ios project...
$ cordova plugin add com.phonegap.plugins.barcodescanner
Fetching plugin "com.phonegap.plugins.barcodescanner" via plugin registry
Installing "com.phonegap.plugins.barcodescanner" for ios
Error during processing of action! Attempting to revert...
Failed to install 'com.phonegap.plugins.barcodescanner':Error: Uh oh!
cannot find "/path/to/project/barcode/plugins/com.phonegap.plugins.barcodescanner/src/ios/CDVBarcodeScanner.mm" ios <source-file>
    at module.exports.source-file.install (/usr/local/share/npm/lib/node_modules/cordova/node_modules/plugman/src/platforms/ios.js:45:48)
    at Object.ActionStack.process (/usr/local/share/npm/lib/node_modules/cordova/node_modules/plugman/src/util/action-stack.js:46:25)
    at handleInstall (/usr/local/share/npm/lib/node_modules/cordova/node_modules/plugman/src/install.js:553:20)
    at /usr/local/share/npm/lib/node_modules/cordova/node_modules/plugman/src/install.js:303:20
    at _fulfilled (/usr/local/share/npm/lib/node_modules/cordova/node_modules/q/q.js:798:54)
    at self.promiseDispatch.done (/usr/local/share/npm/lib/node_modules/cordova/node_modules/q/q.js:827:30)
    at Promise.promise.promiseDispatch (/usr/local/share/npm/lib/node_modules/cordova/node_modules/q/q.js:760:13)
    at /usr/local/share/npm/lib/node_modules/cordova/node_modules/q/q.js:574:44
    at flush (/usr/local/share/npm/lib/node_modules/cordova/node_modules/q/q.js:108:17)
    at process._tickCallback (node.js:415:13)
Error: Uh oh!
cannot find "/path/to/project/barcode/plugins/com.phonegap.plugins.barcodescanner/src/ios/CDVBarcodeScanner.mm" ios <source-file>
    at module.exports.source-file.install (/usr/local/share/npm/lib/node_modules/cordova/node_modules/plugman/src/platforms/ios.js:45:48)
    at Object.ActionStack.process (/usr/local/share/npm/lib/node_modules/cordova/node_modules/plugman/src/util/action-stack.js:46:25)
    at handleInstall (/usr/local/share/npm/lib/node_modules/cordova/node_modules/plugman/src/install.js:553:20)
    at /usr/local/share/npm/lib/node_modules/cordova/node_modules/plugman/src/install.js:303:20
    at _fulfilled (/usr/local/share/npm/lib/node_modules/cordova/node_modules/q/q.js:798:54)
    at self.promiseDispatch.done (/usr/local/share/npm/lib/node_modules/cordova/node_modules/q/q.js:827:30)
    at Promise.promise.promiseDispatch (/usr/local/share/npm/lib/node_modules/cordova/node_modules/q/q.js:760:13)
    at /usr/local/share/npm/lib/node_modules/cordova/node_modules/q/q.js:574:44
    at flush (/usr/local/share/npm/lib/node_modules/cordova/node_modules/q/q.js:108:17)
    at process._tickCallback (node.js:415:13)
Was it helpful?

OTHER TIPS

I was having the same issue when trying to instll the com.phonegap.plugins.barcodescanner plugin into my project. (although I'm using Cordova, not Phonegap).

cordova plugin add com.phonegap.plugins.barcodescanner

Getting the same error. Not really sure what is going on there.

As a workaround, the barcode scanner plugin can be added via git:

cordova plugin add https://github.com/wildabeast/BarcodeScanner.git

This seems to work OK, and achieves the same thing.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top