How to add a variable to phonegap plugin using Meteor?

I have a plugin, https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin , which I would like to use with Meteor. I added the GIT repository to app/.meteor/cordova-plugins .

The plugin requires that the variable be passed to it when it is set. How to add this 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 an error indicating that the URL_SCHEME variable is missing.

+6
source share
1 answer

I will send a complete answer if someone stumbles upon it.

From the Meteor Phone Call Documentation :

Some Cordova / Phonegap plugins, such as the Facebook Connect plugin, require build-time variables such as APP_ID or APP_NAME. To include these variables in the Cordova / Phonegap assembly, configure them in your mobile device configuration file (since version 0.9.4). ( https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration#cordova-plugins-configuration )

So, if you look at an example, here is a way to do it in your mobile-config.js file application:

App.configurePlugin('org.apache.my-plugin', { variable: 'value' });

+10
source

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


All Articles