Is it possible to add a new target, a share extension for example, to an xcode project with out using te xcode GUI?

I have an IOS app and the xcode project is generated at build time by qmake.


The problem is that I now need to add a 'share' extension to it and, as far as I know, it is not possible to generate the project so that it includes the extension.

So I need to add it after the project is created and since this is all done by an automated build system it cannot be dome using a GUI.


Any suggestions on how to handle this?


I have a hack that I have used for an OS X build in which I build the extension in a separate dummy project and then move the .appex into the plugins folder inside the real app. I was hoping for something less hacky for the IOS app.