Depends on how much work you want to put into this.
Solution A: Using Unity's PostProcess
You could use Unity's PostProcess
, to modify the Xcode project accordingly.
Just mark a static method with the [PostProcessBuild]
annotation, and Unity will execute it after the Unity build.
Example:
[PostProcessBuild]
static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
{
// modify the Xcode project here, or run the shell script directly (if it is ok to do this already here)
}
Sources:
Solution B: Append the Xcode Project
You could modify your Xcode Project accordingly, and afterwards just use Append
when starting the next build and Unity asks what to do, when detecting that the folder already exists.
Solution C: Do it manually
- Use
Build
instead of Build And Run
- Modify the Xcode project after Unity finished it's build
- Manually
Run
on the Device using Xcode
Solution D: Run the build in batchmode / use CI like Jenkins
You can invoke the build from the command line (terminal), and do what ever you want during/between the different build steps. But as this is a lot of work, I'd recommend to take a look at a CI like Jenkins. It comes with an installer for Mac OS X and is not that hard to set up. I guess there is a lot of documentation and Q&As about it.
Jenkins: http://jenkins-ci.org
I hope there's something that fits your needs. Just let me know if you need some more help or information. Cheers.