BatchLabs/Batch-Cordova-Plugin

Allow managing strings-batchfcm.xml generation in config.xml

amirhmoradi opened this issue · 5 comments

Hi,
Please allow enabling/disabling the "strings-batchfcm.xml" file generation based on tags in config.xml as this would provide more compatibility with other firebase oriented plugins.

Currently, your cordova plugin is only compatible with cordova-plugin-firebase , and causes compilation errors (duplicate xml entries) if used with any other firebase oriented plugins.

Thanks.

Is there some kind of standard cordova mechanism that allows a plugin to be configured at build time?

you can use cordova hooks
Here is an example of a plugin working with xml files https://github.com/fairmanager-cordova/plugin-localization-strings.git

Thanks, this is what we already use.

I was wondering is there was some standard way to add flags to plugins when adding them to your cordova project. I'm not finding anything like that so looks like I'm gonna have to parse cordova's file myself and look for a predefined config tag

Here is an example of adding variables when installing a plugin [firebase crashlytics] (https://github.com/ReallySmallSoftware/cordova-plugin-firebase-crashlytics) :
cordova plugin add cordova-plugin-firebase-crashlytics --variable ANDROID_FIREBASE_CORE_VERSION=16.0.0 --save

Thanks a lot, it's perfect for that use-case! I'll update this issue when implemented