|Dec 15, 2013, 09:42 AM||#1|
Xcode build phase - unknown number of input files to unknown number of output files
In an Xcode 5 project of mine, I have a folder with a set of input files. The number of input files is unbounded, and there may be subdirectories in this input folder. I have a script takes every file in this input folder and generates a set of output files that go into a second folder. Each output file does not directly map to any of the input files. This output folder needs to end up in my application's Resources folder.
What I've been doing so far is including the output folder in my project as a folder reference (the input folder doesn't have such a project reference). I have a Run Script build phase that runs my script to generate the output files from the input files, and a Copy Bundle Resources phase that copies my output folder.
It doesn't feel terribly clean to reference the output folder directly in my project. Also, the "Input Files" and "Output Files" lists of the Run Script build phase only works with individual known files, which I don't have, so the (lengthy) script runs every time I run my project.
Would there be a better way to handle these input and output files in Xcode's build process?
|build phase, xcode, xcode 5|
|Thread Tools||Search this Thread|
All times are GMT -5. The time now is 04:46 PM.