Here is my problem. I've added a new image to my project to have a launch image for the iPhone 5. It is named Default-568@2x.png as required.
I've placed this image in my project directory, and then added it to my project by dragging and dropping it. I've chosen options : "copy items into destination group's folder(if needed)" and "add to target : myProject".
When I check Builphase -> Copy Bundle Resources my image appears just once, and with the good path.
But when building my project, I have this error :
While reading /Users/admin/Desktop/Projets tests/myProject/Resources/build/Default-568h@2x.png pngcrush caught libpng error: Not a PNG file
Could not find file: /Users/admin/Library/Developer/Xcode/DerivedData/myProject-fjnhmdxkawhvkgecsmmrbgcwqaxk/Build/Products/Debug-iphoneos/myProject.app/Default-568h@2x.png
Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypng emitted errors but did not return a nonzero exit code to indicate failure
What am I doing wrong?
Default-568h@2x.png is not a valid png file. Whether your designer just rename any jpeg file to png file or you yourself renamed it as this.
So just delete this png file and re- add a valid Default-568h@2x with correct format and dimensions.