Can't get cordova-plugin-firebase-analytics to be included in build

Hi,

I previously used PGB and successfully included cordova-plugin-firebase-analytics in my project. However, I can’t seem to get it to be included in builds when using Volt.

It’s referenced in the config.xml as:

<plugin name="cordova-support-google-services" />
<plugin name="cordova-plugin-firebase-analytics" />

However, looking at the log I can’t find any references to it (such as the Checking for saved plugins that haven’t been added to the project section).

Initially I’m trying to get it to work for Android, before tackling iOS later.

Any ideas?

Tip: If you’re pasting code, html or config files, surround it by triple back ticks (```) and it will be fomatted properly.

1 Like

Thanks for the formatting tip :slightly_smiling_face:

Any ideas on the plugin issue?

We can’t really help well with individual plugins. We just don’t have the expertise, and there are thousands of them. VoltBuilder is just a tool to send them to Cordova.

Do you want to use this for the analytics? I’ve heard people are using cordova-plugin-google-analytics for that.

Thanks for the reply.

I understand you can’t support individual plugins, but any ideas why the plugin isn’t mentioned in the log file?

Other plugins I’m using are listed:

Plugin 'cordova-plugin-device' found in config.xml... Migrating it to package.json

or

Discovered plugin "cordova-plugin-whitelist". Adding it to the project

But there’s no mention of cordova-plugin-firebase-analytics in the log, well apart from when it outputs my config.xml

We’ll have another look.

Could you run it again? The job is gone from our servers, so there’s nothing to look at.

Sorry for the delay. I’ve just re-run the Android build.

In your config.xml, you have this:

    <platform name="ios">
        <!-- working @ 20200521-2106 -->
        <plugin name="cordova-support-google-services" spec="~1.1" failed-spec="~1.3.1" />
        <plugin name="cordova-plugin-firebase-analytics" spec="~0.13" failed-spec="~4.3" />
    </platform>    

Try changing it to

        <plugin name="cordova-support-google-services" spec="~1.1" failed-spec="~1.3.1" />
        <plugin name="cordova-plugin-firebase-analytics" spec="~0.13" failed-spec="~4.3" />

It appears enclosing plugin statements inside a platform does not work. This isn’t a VoltBuilder issue - it’s something which Cordova does.

Thanks, I’ll give it a go!