views:

87

answers:

1

Hi all,

I have an iPhone project (Xcode, Objective C++) with two targets - A and B. I want these targets to have different launch screens. The launch screen has a hard-coded name Default.png. I made Default_A.png and Default_B.png.

At first, I tried to add both images to the project in separate folders (folders, not groups) under the same name, and resolve the ambiguity by including one or the other in the respective build. Xcode won't let me add the second file.

Then I tried to include a "Run Script" phase in each target that would copy the right image to Default.png. The phase is not invoked, it seems, since Xcode thinks the phase destination file is not out of date.

Question - is there a right solution to this conundrum? It's all ultimately handle-able, but I'd like to know what's the most seamless way.

+1  A: 

The script should be run regardless of whether or not anything is out of date as it has no dependencies. Did you click the "Run script only when installing box" or something?

Azeem.Butt
I added dependencies, actually. Source - Default_A.png, result - Default.png. :( Probably bad move, huh? The "Run only when installing" is not checked.
Seva Alekseyev
Then you created your own problem.
Azeem.Butt
(hits self repeatedly)
Seva Alekseyev
Then reimplemented by making the script phase establish Default.png as a symlink to the right file.
Seva Alekseyev