Mysterious pngcrush caught libpng error:

From time to time, you may get a mysterious error in Xcode:

pngcrush caught libpng error:

Something like the image below:

pngcrush caught libpng error:

Misterious pngcrush caught libpng error:

The explanation Compress PNG Files Error will just confuse you. Xcode 9 will compile the code and run the app in spite of marking it red. It will even archive the app just before sending it to the App Store and it will still be passed through.

Further explanation will say image.png pngcrush caught libpng error. and also: copying emitted errors but did not return a nonzero exit code to indicate failure. The image seems to be OK but something is wrong anyhow… what could that be!? Turns out that your project will have the same image name listed twice in the Build Phases screen. Eliminate the redundant files from the list and make it look like this:

libpng

Eliminate libpng error in Xcode

The app will run without any red flags whatsoever.

This entry was posted in iOS, Programming and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.