I have a plugin, https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin, that I would like to use with Meteor. I added the GIT repo to app/.meteor/cordova-plugins
.
The plugin requires a variable to be passed to it when it's installed. How would I add that variable?
I added this to mobile-config.js
:
// Pass preferences for a particular PhoneGap/Cordova plugin
App.configurePlugin('nl.x-services.plugins.launchmyapp', {
URL_SCHEME: 'mycoolapp'
});
App.setPreference("URL_SCHEME", "mycoolapp");
I am still getting the error that states that the variable URL_SCHEME is missing.
I will post a complete answer in case someone stumbles on it.
From Meteor Phonegap documentation:
Some Cordova/Phonegap plugins, such as the "Facebook Connect" plugin, require build-time variables such as an APP_ID or APP_NAME. To include these variables in your Cordova/Phonegap build, set them up in your Mobile Configuration file (starting from 0.9.4). (https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#cordova-plugins-configuration)
So if you look at the example, here is a way to do it in your app's mobile-config.js
file:
App.configurePlugin('org.apache.my-plugin', {
variable: 'value'
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With