I have some png files in my iPhone app project. They work fine when I build for the simulator. But when I build for the device, suddenly every single png file generates the dreaded "while reading such-and-such.png pngcrush caught libpng error: ... Could not find file: ..."
As I say, everything builds and runs great with the simulator. It's only when I change the scheme to build for the device that I get the errors.
I tried cleaning and rebuilding.
I tried manually deleting the Products directory.
I tried restarting my system.
I tried using the files in a different project (same results there).
The only thing I have found that works is to open the files and resave them. However, this is a less than optimal solution because I have hundreds of PNG files all suffering from this issue. I would rather understand what the issue is so that I can fix it directly.
Any ideas?