Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CopyPNGFile error

When I archive the application I get CopyPNGerror for all images in my project.I tried all means deleting all the images,adding them again,check Build Phases(copy bundle resources).No duplicates are found.I couldnot understand what to do further and submit the app.When I archive another application with same images archive is successful

CopyPNGFile "/Users/admin/Library/Developer/Xcode/DerivedData/App1-auevnkwujohdqtflzyputmxbvrmt/Build/Intermediates/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/App1.app/about2 copy.png" "Classes/../about2 copy.png"
    cd "/Users/admin/Documents/App/App (1)"
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypng -compress "" "/Users/admin/Documents/App/App (1)/Classes/../about2 copy.png" "/Users/admin/Library/Developer/Xcode/DerivedData/App1-auevnkwujohdqtflzyputmxbvrmt/Build/Intermediates/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/App1.app/about2 copy.png"

Could not open output file /Users/admin/Library/Developer/Xcode/DerivedData/App1-auevnkwujohdqtflzyputmxbvrmt/Build/Intermediates/ArchiveIntermediates/App/InstallationBuildProductsLocation/Applications/App1.app/about2 copy.pngCommand /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypng failed with exit code 1

What shall I do to solve this error?

like image 763
Honey Avatar asked Jul 18 '13 10:07

Honey


2 Answers

Solved here -> https://stackoverflow.com/a/18297130/1451462

I removed the duplicate references in my png files!

Build Phases -> Copy Bundle Resources

and removed all the duplicated entries of lunch images DefaultXX.png

like image 113
Davide Avatar answered Oct 13 '22 18:10

Davide


I had the same problem, in my case the image causing the problem was a JPG renamed manually in PNG. I suggest you to open the image in a Image Editor (Gimp, Photoshop...) and save it as PNG.

like image 13
Marco Pace Avatar answered Oct 13 '22 17:10

Marco Pace