/ ios

App icon generator for iOS, watchOS and OS X

Are you tired of manually resizing app icons? You will love my latest tool. It's called iconer and it totally rocks. In this tutorial I'll teach you how to set it up and make your life more comfortable. Let's dive in.

You are probably familiar with homebrew, or if you are not it's time to. Brew is the most amazing package manager for OS X. It's more or less like the apt-get on linux. You can install packages from the core source, and you can "tap" external code repositories. Tap my repo and install iconer with just two simple commands.

brew tap tib/tap
brew install iconer

Now you are ready to go. Create a new project, add a basic icon file to it:

As you can see I have an AppIcon.png files in my project. You can name your icon file whatever you want, iconer will always create an AppIcon directory inside the Assets.xcassets folder. It's also going to strip out alpha channels from the original icon file so you can safely upload your app to iTunesConnect. So next step is to create a new build script phase with the following command:

The only important thing here is that your script should stay before the bundle copy phase, because first we need to have the proper icons, only after then is safe to move the assets to the correct place. That's it you are done, from now on your icons will be generated from one source you don't have to worry about the sizes, or platforms. You can repeat the same thing for every build target. OS X, and watchOS platform sizes are supported too.. :)

One more thing

You can change the background color of your icon as well with the -b, --background flag, and you even have some more options.

Just read the manual or ask for help. (iconer --help)

The result is a complete asset catalog for your application. Enjoy. :)