2

I have a strange problem in my project and can't figure out a way to fix it. It manifest itself when I Archive the project. If I just build it, all is OK.

This is the error I get...

While reading /Users/jorgen/Desktop/isengua-en-de_120125/Airship/UI/Default/Subscription/Resources/Shared/middle-detail@2x.png pngcrush caught libpng error: Read Error

However the actual file that it can't read changes. I have checked that it there and that it can be opened. It is always the Airship files, but it can be in Push, StoreFront or Subscriptions.

Also in the same project I have a problem with the icon.

warning: iPhone/iPod Touch: isengua_ENE-DE_114+.png: icon dimensions (0 x 0) don't meet the size requirements. The icon file must be 57x57 pixels, in .png format (-19014) Unable to validate your application. - (null)

The icon for Retina is 114x114 and the other is 57x57. Again I have checked and double checked this. I have gone back to a copy I had two weeks ago, and the same thing happens.

Grateful for any help.

Jorgen
  • 465
  • 3
  • 10
  • 24
  • You might want to check this http://stackoverflow.com/questions/5287600/build-app-with-xcode-4-it-always-show-some-error-about-png-image – iDifferent Feb 15 '12 at 18:13
  • Look in the app bundle and see if the icon file is at the top level. – zaph Feb 15 '12 at 18:13
  • App bundle is the window on the left, correct? My icon was made in Photoshop with Save for Web & Devices as png-24, transparency off and interlaced off. – Jorgen Feb 15 '12 at 20:30

2 Answers2

2

If it only happens when you archive then the error happens when attempting to package/move all the files required into the the archive folder. Building just pulls from the referenced location.

Easy fix is just remove the files and re-import. 2 files would no be a big hassle.

Also you could peek at your info.plist and/or your copy bundle resources and confirm that everything points to the right files.

rinzler
  • 236
  • 1
  • 4
  • I have deleted and re-imported all of them and it still happens. – Jorgen Feb 15 '12 at 18:31
  • Unfortunately it's not just two files. They differ everytime. I did delete all UA's pngs and reimported them, and it still happened. The icon file I don't know how many times I have remade, deleted and remported. I don't get the (0x0) bit. It's like it's nothing size. – Jorgen Feb 15 '12 at 19:15
  • It actually came down to switching off the png compression in the compiler. Apparently some bug in Xcode 4.2. – Jorgen Feb 16 '12 at 15:23
  • I just got this issue as well! It was kind of hit and miss and my sure-fire fix issue did not work. then I noticed that I had Icon57.png instead of icon57.png (the plist name) – rinzler Feb 26 '12 at 03:10
0

None of the answers worked for me but this did. I check in the resources folder i.e. not the www folder, so:

PROJECT-NAME/PROJECT-NAME/Resources/splash

in that folder there should be a copy of the same Default.png and Default@x2.png that are in your www folder.

when i checked they were the phonegap defaults. I replaced them with a copy of mine from the www folder. Did a clean and a build and it finally worked!

nathajamal
  • 90
  • 7