Are plugins supposed to just install?

If i install a plugin via ‘ionic plugin add …’, should i expect automagic changes to config.xml? I’ve been having a number of problems getting ngCordova plugger wrappers to work – all of which i’ve tracked down to the plugins not installing the config.xml entries. Similarly, why is the Plugins folder listed in .gitignore?

regards,
Adam

1 Like

Plugins should just install automatically.
What you should do is if you have a platform already added and you install a new plugin, you’ll need to build for that platform.

$ ionic platform add ios
$ ionic plugin add org.apache.cordova.inappbrowser
$ ionic build ios

We ignore the plugins in the .gitignore file because there is some weigh to them, especially considering the broad spectrum of platforms a cordova plugin could support.

There is still something i’m not getting. When i add a platform, git never sees any untracked changes. How is the information about platforms persisted?

ex. if i have an ionic app repository and want to clone/build it for android on two different machines, do i have to do an ionic platform add android’ on both because the platform information is persisted outside of source control?

yes you do have to add the platforms and the plugins, cause the .gitignore exclude the plugins and platform directories

node_modules/
platforms/
plugins/

so if you want your git to have everything, you should edit that file and remove the excluded directories from it.