Error One:
While Reading/xxx/xxx/xxx/img1.png Pngcrush caught libpng error:not a PNG filcould not find file:/users/xxx/library/d eveloper/xcode/deriveddata/cookbookdemo-cnttcobrbmvbddeiesgsxnfwihfe/build/products/debug-iphoneos/ cookbookdemo.app/img1.pngcommand/applications/xcode.app/contents/developer/platforms/iphoneos.platform/ Developer/usr/bin/copypng emitted errors but does not return a nonzero exit code to indicate failure
The reason is that the PNG image is introduced, and the internal encoding of the image does not conform to the true PNG format. (It is possible that the JPG image modifies the suffix name). The solution is also very simple, that is, using authentic PNG. Method Two: If it is not because of the image format of the cottage caused by the deletion after the re-import again error two:
Not a PNG filcommand/applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/usr/bin/ Copypng emitted errors but does not return a nonzero exit code to indicate failure
Two workarounds:
1. Set the Compress PNG files in the build settings to no, problem resolution, but after this setting, IPA will be very large, not recommended.
Preview on 2.mac opens the problematic PNG file and then re-exports it to a PNG file for problem resolution.
Case THREE:
Submit error message
The reason is that the hint of PNG is not the PS everywhere PNG, but the manual modification of the JPEG suffix named PNG, in the simulator will not error, but in the real machine, do not recognize this so-called "png" picture.
Solution:
Re-export PNG with PS OK.
While reading XXX Pngcrush caught libpng error:n