How do I add a variable to a phonegap plugin with Meteor?

我的梦境 提交于 2019-12-05 07:34:25

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' });

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!