Ionic-cli: bug: Adding plugin not updating config.xml

Created on 13 Oct 2016  路  4Comments  路  Source: ionic-team/ionic-cli

Short description of the problem:

When adding a plugin, the config file does not get updated. This means that when working on the repo for the first time and adding a platform, only the plugins listed in the config file will be installed. There may be tons of other plugins required by the app which have to be manually added again. This is terribly time consuming and a huge cause of bugs and issues.

For example:
ionic plugin add cordova-plugin-app-version

What behavior are you expecting?

Ionic needs to keep track of which plugins have been installed. If I pull the repo on another machine (having not committed the plugins folder) and I run a command such as ionic platform add ios all plugins should be pulled.

Right now, the only plugins that are installed are the ones from the ionic base project which has the following lines in the config:

  <plugin name="cordova-plugin-device" spec="~1.1.3"/>
  <plugin name="cordova-plugin-console" spec="~1.0.4"/>
  <plugin name="cordova-plugin-whitelist" spec="~1.3.0"/>
  <plugin name="cordova-plugin-splashscreen" spec="~4.0.0"/>
  <plugin name="cordova-plugin-statusbar" spec="~2.2.0"/>
  <plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
  <plugin name="cordova-sqlite-storage" spec="~1.4.7"/>

Every time any plugin is installed, an entry should be added with the version so that all relevant plugins are installed the next time a user pulls the project from a repo.

Post the output of ionic info below please
Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v5.12.0
Xcode version: Xcode 7.3.1 Build version 7D1014

Most helpful comment

I did not know that. _Should be documented._

All 4 comments

@dylanvdmerwe try ionic plugin add cordova-plugin-app-version --save. The --save argument adds the plugin information to config.xml.

Hope it helps.

I did not know that. _Should be documented._

Using --save doesnt seem to be working anymore

Was this page helpful?
0 / 5 - 0 ratings