As part of the iOS developer tasks, I have to create plugins for Unity3d to interact with native libraries. So far, so good. But what happen if you want to modify programmatically, via scripts, or command line the XCode's project to automatically add dependencies and files?
Short answer: good luck with that, the format is not documented at all. It's a big black box.
Fortunately, one fella (https://bitbucket.org/darktable) made part of the work creating a python script to modify XCode's project files.
But there is small hiccup with this script, it doesn't write the latest XCode format, so Unity3d won't be able of update the project if something has changed.
Therefore, i just decided to fork the project (https://github.com/kronenthaler/mod-pbxproj) and extended it to write the right format and give it back to the community, so XCode, Unity3d and the developers may live in peace.
may the fork be with you.