Today suddenly appeared a compilation problem, has been engaged me for a long time, here not much to say. Just sort it out and record it!
The problem description is as follows:
Appears: Copypngfile exception error, COMMAND/APPLICATIONS/XCODE.APP/CONTENTS/DEVELOPER/PLATFORMS/IPHONEOS.PLATFORM/DEVELOPER/USR /bin/copypng failed with exit code 1
Several solutions for online circulation:
1. Set the Compress PNG files in the build settings to No, solve the problem, but after this setup, the IPA will be very large, not very ideal.
Preview on 2.mac opens the problematic PNG file and then re-exports it to a PNG file or uses Photoshop to save the PNG image as not interlaced (no interleaving), so there is no error when debugging the machine.
The first method did not try
The second method tried, and it didn't work in my project
The way to solve my problem eventually is:
1. Click on the targets of the project
2. Click Build Phases
3. Click Copy Bundle Resources
4. Look at the resources inside what is shown in red, then select it, at the bottom there is a delete button. Just erase it.
IOS Copypngfile Exception Problem Resolution