Phonegap-plugin-push not included in apk file with ionic packakge build

Hi all,

when I build an apk file using the package service the phonegap-plugin-push is not included. I can verify that by opening the apk using an unzip tool.

I am using ionic2 and the dependency for the plugin is defined in config.xml

 <plugin name="phonegap-plugin-push">
    <variable name="SENDER_ID" value="XXXXXXXXX"/>

The only way to get the build service include the plugin is by explicitly using the version “1.8.4” like that:

 <plugin name="phonegap-plugin-push" spec="1.8.4">
    <variable name="SENDER_ID" value="XXXXXX"/>

It doesnt work with any newer Version of the plugin (I tried every version from 1.8.4 to 1.10.4)

Anyone else is experiencing that?

Thanks in advance for any hint.

1 Like

We are seeing this same behavior, when built locally the apk can be opened and one can see the plug is listed in the cordova_plugins.js file however when the build ionic package build, when the apk is downloaded and checked for the entry in cordova_plugins.js it is not present.

As you have suggested I have rolled the spec back to 1.8.4, executed the ionic package build, downloaded the apk and confirmed that now the plugin is once again present.

I reported that bug to the ionic team and after the last recent update it is fixed.

In the meantime I updated to the last recent ionic cli (3.4.0) and the last recent cordova android platform (using this command: cordova platform update android@6.2.3 --save)

I cant figure out if perhaps one of that itself fixed the problem…

But now phonegap-plugin-push 1.10.4 is included in my apk file.