9

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

FrankieA
  • 278
  • 1
  • 8

6 Answers6

4

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.

Wolfgang Schreurs
  • 11,779
  • 7
  • 51
  • 92
  • I confirm your guess. I've checked it with the Activity Monitor application. I've archived one project, then Organizer freezed my Xcode. At that time pngcrush was processing PNGs from another project. So for me, deleting (or moving) all archives helps. – Vladimir Obrizan Aug 20 '12 at 11:59
2

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)

SushiGrass Jacob
  • 19,425
  • 1
  • 25
  • 39
0

@wolfgang's answer was right for me, and in general - clean up Organizer on all its data -

  • Archives
  • Devices
  • Provisioning Profiles

You can find a discussion on Apple support forums: https://discussions.apple.com/thread/3159366?start=0&tstart=0

I got to a point I had to restart the computer if I accidentally opened Organizer. Now I can breathe again.

Oded Ben Dov
  • 9,936
  • 6
  • 38
  • 53
0

I solved mine Organizer freeze by:

rm ~/Library/Developer/Xcode/UserData/IDEOrganizerWindowController.xcuserstate

Kyle Robson
  • 3,060
  • 24
  • 20
0

First of all try restarting your computer. Sometimes Xcode can get into a loop that only a restart can solve.

Secondly, have you tried letting it finish? PNGCrush is a process that compresses all the PNGs in your project to save space.

Also, try deleting your workspace file. See here:

Xcode 4 - slow performance

Community
  • 1
  • 1
sudo rm -rf
  • 29,408
  • 19
  • 102
  • 161
  • I've rebooted a few times & tried to wipe my workspace - no go. I've also tried to let it run, but it never really finishes (I waited up to 20 mins?). Sometimes I think it's gone, and I'll click around Organizer, then bam, the pngcrush process starts up again. Lastly, I don't understand why pngcrush is running even if I set "compress png" option to NO? – FrankieA Jul 05 '11 at 21:27
  • Yep that is strange. I'm thinking something is wrong with your project workspace file or your Xcode userdata. – sudo rm -rf Jul 05 '11 at 21:33
0

For some reason my Info.plist file had multiple (some invalid) entries for Icon files and Icon files (iOS 5). I removed all the items in these lists, re-added the app icon, and everything seemed to start performing well again. Hope this helps someone else!

raidfive
  • 6,603
  • 1
  • 35
  • 32