I have a Cordova based iOS project in which I need to add a custom script to the build phases. I have one set up and it works fine, however I need to be able to add the build phase automatically somehow, as I need the project to be able to install and build automatically on a CI server, without having to manually add the phase in Xcode.
To clarify, when cordova platform add ios is run the project is created without build phases, I need to add a build phase in programmatically, before (or during) cordova build ios.
I can add custom build settings in the .xcconfig file, is there somewhere I can define build phases? I see that the build phase is present in my .pbxproj file, however this is automatically generated and contains some random IDs so I am not sure its something I can just parse and insert arbitrary stuff into?