Search code examples
iosxcodepngcrush

Xcode 4.3.2 Default Launch Image Corrupted Bottom Pixel


When I launch my app on iOS 5.1, on a device (only tested on retina display so far), the [email protected] image is displayed with a single green line below the bottom of the image. I've confirmed the image is 640x960, and does not contain this green line.

I'm guessing this must be due to an issue with the PNG optimization tool Xcode is running prior to adding the resources to the bundle, especially since I don't see this when I run using the simulator.

Is there a way to repair or update this PNG optimization utility? (I'm running the latest Xcode 4.3.2 for Lion, from the Mac App Store).


Solution

  • There is a bug in pngcrush 1.6.4 which is installed in the app bundle of Xcode 4.3.2. I was able to fix this by following these instructions (thanks to http://www.mactricksandtips.com/2012/02/installing-and-using-pngcrush-on-your-mac.html):

    1. Download the latest release version of pngcrush here: http://sourceforge.net/projects/pmt/files/pngcrush/
    2. Unzip the file using your favorite compression utility (or, in Terminal (or your favorite command line tool), navigate to the directory where you saved this download, and run this command (you may need to change the version number according to your download)

      tar -xvzf pngcrush-1.7.15.tar.xz

    3. Navigate to the unzipped directory in your command line tool.
    4. Run the command "make"
    5. Run the command "sudo cp pngcrush /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush" to copy this latest version on top of the old version.