Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4 archive results in slow/unresponsive Organizer & pngcrush process takes up 100% cpu

sorry about the rather confusing title, but I tried to get in as much info as possible.

Problem:

  1. I'm trying to archive my iPhone app into an ipa file for OTA testing (via TestFlightApp) - so in Xcode, I perform a Project > Archive.
  2. After the archive is successful, it opens the Xcode Organizer to create the ipa file. BUT as soon as Organizer is opened, Xcode becomes VERY slow & essentially unresponsive.

So naturally I open Activity Monitor to see what's going on and there's a process called "pngcrush" using up almost all my cpu (90%+) and causing Xcode process to be intermittently listed as "not responding". I can't seem to do anything in Organizer because it just keeps throwing the spinner/loading cursor.

Any ideas on how to fix this would be great! Also, I've tried setting "Compress PNG" option in build settings to NO, but problem is still there. Thanks!

Xcode 4.0.2, OSX 10.6.6

like image 842
FrankieA Avatar asked Jul 05 '11 20:07

FrankieA


2 Answers

Deleting Archives will improve the responsiveness of the organizer. I guess the Organizer runs pngcrush on all archives. Perhaps one should submit this as a bug to Apple.

The Archives are saved in ~/Library/Developer/Xcode/Archives. If you want to keep the archives as backup, move them to another folder. Personally I've created a folder ~/Library/Developer/Xcode/Archives Backup to save old archives in.

like image 81
Wolfgang Schreurs Avatar answered Oct 08 '22 17:10

Wolfgang Schreurs


This is a weird bug.

I found the way I solved it was by deleting the launch images from the bundle and then adding the images normally, though, the add files interface. If I dragged the images into the summary pane on the application target, it cause the large image to show up in the organizer preview image which PNGCrush is constantly trying to shrink.

I found it by deleting the icon and/or launch image file as well as moving the archives with the offending icon/launch image files. I also found, the launch image file was 20px too small as I trimmed for the status bar which is incorrect. (See: https://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW5)

like image 40
SushiGrass Jacob Avatar answered Oct 08 '22 19:10

SushiGrass Jacob