views:

8

answers:

0

Hi there,

So, I have an application that has 2 targets. Each of these targets specifies a very different set of assets which populate that target's application. The idea here is that each target will build an application with completely different content, but the same core functionality. I have a reference folder for each target that holds all of these app specific files.

Then I currently have a "Constants" class which holds the name of the directory, which gets prepended to the paths throughout the application.

However, every time i switch targets i have to change this variable. The possibility of doing a build and not changing that variable is high, as it always is with a tedious manual process such as this, and I recognize it as being poor form generally.

I am at the tip of the iceberg in terms of learning Xcode and obj-c, and I know there must be a better way to do this. Is this something i can specify in my app-info.plist? Or in my Target User Defined Build settings?

I would ordinarily think that i could just have a class or plist that was app specific which got included in each target's build, but these files would have to have the same name, and so i'd run back into my original problem.

Can I some how base it on the name of the application? Or run a script or macro at build? Or put in Executable arguments/variables?

There seem to be so many avenues to investigate that I cant settle on which one to start with.

Thanks for your help!