When I build my app with Xcode 4 it always show this error message:
CopyPNGFile /Users/michaelchen/Library/Developer/Xcode/DerivedData/iMusicBox-boeawugacmhacbdtyymnprzfobyq/ArchiveIntermediates/iMusicBox/InstallationBuildProductsLocation/Applications/iMusicBox.app/list_cell.png Images/list_cell.png
cd /Volumes/WORK/Works/iMusicBox
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
"/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/PrivatePlugIns/iPhoneOS Build System Support.xcplugin/Contents/Resources/copypng" -compress "" /Volumes/WORK/Works/iMusicBox/Images/list_cell.png /Users/michaelchen/Library/Developer/Xcode/DerivedData/iMusicBox-boeawugacmhacbdtyymnprzfobyq/ArchiveIntermediates/iMusicBox/InstallationBuildProductsLocation/Applications/iMusicBox.app/list_cell.png
While checking alphas in /Volumes/WORK/Works/iMusicBox/Images/list_cell.png pngcrush caught libpng error: Not enough image data
but It's OK with Xcode 3.2 - why?
Follow the steps:
Found it!!
You have to save your PNG files as NOT INTERLACED. Try to open the file in photoshop (or similar), save as, and select "Not interlaced".
It is working in my case
hope this helps
It may be the "Compress PNG Files" setting (from the Packaging section of Build Settings).
I solved this error by switching it to "No".
Check that you don't have duplicate entries in the Target's "Build Phase"-> "Copy Bundle Resources"
Mine weren't interlaced but I kept getting odd errors from pngcrush. Eventually I deleted the files not just disk but through XCode. I added them back in one by one by drang-and-drop into XCode, building after each, expecting to hit one that had an issue. I never did. My conclusion is that you really need to manipulate the files from XCode and not the filesystem at all.
In my case, I had to remove all PNG files from the folder and then re-adding the files again without drag-and-dropping the images into the Xcode UI (under Launch Images). The latter was key in my case, first adding the files to the folder and then dragging them into the UI somehow cause a duplicate which screwed it all up. Try that out if nothing else's working for you.