How to manage iOS/Android projects that require addition of native code such as app extensions


Ionic not only provides the nice components using HTML/CSS/JS but also provides a tooling (ionic-cli) that enhances the productivity of the developers.

At present, the platform and plugin directories in my project are not under source control; I rely on ‘ionic platform/plugin add’ commands to create them. This is really good.

However, now I am facing a challenge where my application should also have ‘app extensions’. I believe this means that I need to have my own XCode project with the app extension project added as a sub project etc. I am aware of the possibility to embed a cordova/ionic application manually but I fear that by doing so I will lose all the benefits of using ionic-cli.

There could be two potential solutions -

a) Ionic-cli supports the notion of external iOS/Android project. This way majority of development time when a browser is used instead of the real devices & emulators, we could still benefit from existing tool chain. When the time comes to build the iOS or Android project then ionic portion is copied to the external project.


b) Modify the iOS & Android project generated by ionic-cli (cordova) and put it under source control. The disadvantage is that I will end up putting lot of source code (especially cordova and plugins) in source control and will have to update it every time there is an update.

Would appreciate any thought and guidance on this matter. Which option (a) or (b) is better ? Is there any other option ?

Regards & thanks