Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i fix this CopyPNG File error?

Tags:

xcode

ios

While reading /Users/user/Desktop/AppProject/PruebaApp/Logo Retina.png

pngcrush caught libpng error:

Read Er Could not find file: /Users/user/Library/Developer/Xcode/DerivedData/PruebaApp-cblepoaxbqzyopcbcswwqjtftyon/Build/Intermediates/ArchiveIntermediates/MaderoAPP/InstallationBuildProductsLocation/Applications/MaderoAPP.app/Logo Retina.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

Im getting these errors while archiving project, at the end it does archive but i want to get rid of it. I had trouble with the app before and i read that i should delete the DerivedData/(myproject)folder so i did. and apparently it is trying to look for the images in that folder how do i fix this??? Help!

like image 863
Daniel Medina Sada Avatar asked Jul 08 '13 16:07

Daniel Medina Sada


3 Answers

Try first by Hard Cleaning your project CMD+OPTION+SHIFT+K, If problem exists apply following method,

Build Phases -> Copy Bundle Resources, Any fileName is red color?

Or

Convert Logo Retina.png or Create it again, maybe it's an encoding\format issue.

Or

Rename "Logo Retina.png" to "LogoRetina.png".

~Good luck~

like image 190
Stormer Avatar answered Nov 20 '22 20:11

Stormer


It also happens when you have multiple images with the same name in TARGET->Build Phases->Copy Bundle Resources. To resolve it -

  1. Search for the image name that you are getting an error for in Build Phases search bar at the top.
  2. If you get multiple results in Copy Bundle Resources for the search query, just remove others from it by clicking on "-" sign. Make sure you have same images for the multiple results. If not you have to rename the actual files of other entries.
  3. Just compile your code. You are good to go.

Hope it works for you.

like image 13
Anup H Avatar answered Nov 20 '22 18:11

Anup H


Just open image in Preview app and export it as png file. Replace old image with new in Xcode.

like image 9
Evgeny Mikhaylov Avatar answered Nov 20 '22 18:11

Evgeny Mikhaylov