Ionic platform add - only add specific plugins

Hello,

I am trying to utilize two different versions of the same plugin in my project (one geared for Android and one for iOS). However, whenever I run ionic platform add android it pulls in the plugin meant to be used for iOS (which causes compile errors) in addition to the plugin meant for Android. I’ve edited the ios.json and android.json files in the plugins directory hoping that would prevent the ionic platform add command from copying unnecessary plugins, but this didn’t work. Does anyone have any insight here?

Example:
I have plugins A, B, C, D

After running ionic platform add android, I’d like to have an Android project with plugins: A, B, D

After running ionic platform add ios, I’d like to have an iOS project with plugins A, B, C

1 Like

Hi Malcorn, I am trying to do exactly the same, have you found a solution for this already?

hi, I never did solve this myself, just had to work around a few things on our build system

Too late reply, anyone who is facing the similar problem can have a look at this link: