Reputation: 513
In my Meteor project a Cordova Plugin needs to be added. While this is documented in
https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration
the problem here is that the Plugin needs a command line argument, meaning in a common Cordova project it would be added like so:
cordova plugin add pluginName --variable varName="VAR_VALUE"
So how can I add a variable in Meteor?
Just adding the argument gives back: "--variable: unknown option"
Without the argument I get the error "Failed to install Plugin:Error: Variable is missing.."
Another way would be to clone the project, upload it to my Github-account and then put in the variables by hand.
meteor add cordova:pluginName@https://github.com/myName/prjName/tarball/SHA-ID
Here the error is "Must declare exact version of dependency". But how shoud I?
meteor add cordova:[email protected]@https://github.com/myName/prjName/tarball/SHA-ID doesn't work either?
Or can one add a Plugin to a Meteor project manually, meaning adding the sourcefiles to the .meteor-directory?
Any help would be appreciated.
Upvotes: 0
Views: 767
Reputation: 513
I couldn't make it work the way Slava posted. I don't know why actually. The way it worked on my system with the plugin was to git clone the Plugin from Github, fill in the KEYS, push it to my Github account and add it with meteor add cordova:plugin@https://github.com/myacc/prj/tarball/sha
Edit:
It does work, but you also have to put the variable in single quotation marks, like so
App.configurePlugin('plugin.google.maps', {
'API_KEY_FOR_ANDROID': 'YOUR_API_KEY'
});
Upvotes: 0