Search code examples
ionic-frameworkngcordova

Ionic platform Config file changes


I'm trying to create push notification app using Ionic. When i build the app the following line is removed from res/xml/config.xml file in android platform.

<feature name="PushPlugin"> <param name="android-package" value="com.plugin.gcm.PushPlugin" /> </feature>

Please help me understand the issue.


Solution

  • Did you install the Push Notification plugin or are you adding this line manually?

    Every time you build the config.xml is overwritten. As far as I know each plugin includes all the and it needs to function properly, and they are added to the config.xml and AndroidManifest respectively when you build your app.

    So if you've installed the PushPlugin, the line will be added automatically. If you're adding the line manually before building it will be overwritten.

    In case the line is not after all the above, try uninstalling and installing the plugin, then running

         ionic prepare android
    

    before running the build again.