tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
05/18/13 05:06 AM (12 years ago)

The error 'CopyPNGFile Error' keeps coming up

My app is a pretty image intense application. It's got about 150 images on it. Now I have completed my app, which looks magnificent on the iPad/iPhone Simulator, I now want to be able to test it on my iPhone and iPad. The problem is that most images don't upload to my iPhone or iPad. A few do, for some reason, but only the ones which are background images or images with transparency. Where my header images would be, is just a grey question mark. This has never happened to me before, and I have done everything correctly to build my app together. The app on the simulator works fine. The errors that I get is 'CopyPNGFile Error' I've re-downloaded the app so many times I can't mention, so something must be going wrong somewhere in the code. The same happens when I archive the app.
 
miche
Apple Fan
Profile
Posts: 59
Reg: Jun 07, 2011
Lancashire, UK
3,740
like
05/18/13 06:05 AM (12 years ago)
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
05/18/13 06:12 AM (12 years ago)
That's strange - it shouldn't be related to code though - just Xcode. I'm sure you've gone through this, but have you tried downloading the source code to a completely different location on your hard drive? When you drag the images into Xcode, do you check the 'copy to project folder' box (or whatever it's called?). Have you tried resetting content and settings on your simulator to see if the problem doesn't then show up there? Have you tried renaming the project from the control panel then downloading? Have you tried uninstalling Xcode and reinstalling? Obviously, some of these are more drastic measures than others. Hopefully one will work though.
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
05/18/13 06:31 AM (12 years ago)
It is the image itself. One if the images aren't properly formatted. It has happened to me before when I accidentally saved a psd as png in photoshop. Saved as png but should have been psd. Try adding half of the images and try tracking down the culprit image... Did you use an image shrinker?
 
Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
like
05/18/13 07:18 AM (12 years ago)
Have you tried ImageOptim to fix this? Jake
 
varung
I hate code!
Profile
Posts: 22
Reg: Feb 10, 2013
delhi
920
like
05/18/13 07:20 AM (12 years ago)
Clear your Xcode project image folder. Clean the Build and Paste again all the images in the Xcode (in your project folder). Hopefully it will resolve your problem.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
05/18/13 08:48 AM (12 years ago)
I have seen this problem. If you look closely at the copypng error, it should tell you exactly the path and name of the image causing the problem. In my case, I think I caused the problem by moving image files around using both xcode and the external file manager option and getting things muddled. I ended up dragging the files out of the project, and from the directory and then adding everything back in again. That fixed it for me.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.