We are using a custom compiler to compile some resources for our project. These resources are text-based and have a .ink
extension. We are using a custom Build Rule for these ink
files. (see footnote if you're interested in what they are!)
Our ink compiler takes a root ink
file, which can have include
statements for other ink
files. So, within the Xcode project, we only include the root ink
file, so that it doesn't attempt to compile the child ink
files independently.
However, we now have the problem that if you change one of the child ink
files, Xcode doesn't know to recompile the parent.
Is there some kind of custom build script we could do that would automatically touch the root file if any of the children are modified? Or some kind of dependency we could set up? (Currently we touch the root file every build, but this will become far too slow as the project grows)
We really don't want to have to change the way the ink compiler works in order to do this!
p.s. if you're interested in what the heck these ink files are: They're story files - we develop text based narrative games for iOS.
If you select your project in Xcode and go to "Build Phases" you can add shell scripts to the build process of your app. Maybe this could be a good start for checking if your ink files need to recompile.
More infos here: Running a Script While Building a Product