Search code examples
iosios5localization

Localization & Warning: Multiple build commands


I would like to localize my apps with same filename. The very first thing is to localize Splash screen. The file & folder structure is like this:

MyApp/ en.lproj/ Default.png [email protected] zh-Hant.lproj/ Default.png [email protected]

Then, I drag the 4 Default.png to xCode, making the xCode look like this:

Multiple Default.png

Warnings occurred for each Default.png, saying that Warning: Multiple build commands. Did I miss something? Or did I do something extra?

UPDATE: the localization works (except there are warnings). Can I do the same for all images? As I have 300+ images for my apps, I don't want to make it wrong at this stage. Just to make sure I am in right track, but the Warning makes me so uncomfortable.


Solution

  • Go to Build Phases of the Target you are building. Then expand Copy Bundle Resources as in the image below.Sample

    You should see the file raising the warning in this list twice. Also, if you have any .git references in there you can remove them. Xcode is complaining because you are attempting to bundle one file multiple times in your project. Delete the offending reference and rebuild, it should now be error free.