I keep getting a warning for several build commands regarding .png files for my iOS project

Warning. Several build commands for the output file / Users / nroldos / Library / Developer / Xcode / DerivedData / artistreeApp -fnivhzlzlmkerwhdwwfnelzldkqx / Build / Products / Debug-iphonesimulator / artistreeApp.app / Near_Me@2x.png

Warning. Several build commands for the output file / Users / nroldos / Library / Developer / Xcode / DerivedData / artistreeApp -fnivhzlzlmkerwhdwwfnelzldkqx / Build / Products / Debug-iphonesimulator / artistreeApp.app / Search@2x.png

Etc...

Does anyone know what these warnings mean? I would try to explain this more, but I have no clue where these commands with multiple assemblies come from. I have only one view controller where I call these .png files

+4
source share
2 answers

Xcode complains about this type of warning when it is confusing. What happens is that the project has more than one file with the same name, and Xcode does not know which one to compile.

Solution: Find the resource in Copy Bundle Resourcesand delete the duplicate entries.

Steps:

  • Click the Copy Bundle Resourceson tab Build Phases.
  • Find duplicate entries for the same files in this list.
  • .
+10

. .

+3

All Articles