Search code examples
iosxcodeiconsresolution

The most efficient way of adding "AppIcon" to project in Xcode?


Im programming an app in xcode and something has recently come to my attention when designing app icons. Here is the current setup that I have in my project:

xcode app icon screen Right now I have a 87x87pixel image for the "29pt" option (far left of the image), I also have a 120x120 for the 40pt option(middle) and I have a 180x180 pixel png for the 60pt option(far right). This seems highly inefficient, not only this but I need to supply @2 resolution images too? Surely there is a better way of doing this?


Solution

  • There are a couple of approaches I've taken in the past. One way is to create your icons, etc. in GIMP, Photoshop, etc. If you need to resize them, there's a command line utility called ImageMagick which I find to be a lot easier for resizing images than setting sizes in an image editor. The command you would use for resizing is called mogrify.

    Option two is to get your hands on an app called Asset Catalog Generator. You just dump your images in and it spits out the correct file sizes and naming conventions. It's probably the best $4.99 I've spent in a long time.

    Update It appears someone has written a script to create the icons, too. I haven't used it myself, so you might want to poke around and look for others.