Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use one icon size in Xcode

Tags:

xcode

ios

I generate a lot of apps for clients. Nowadays there are a lot of different icon sizes (57, 72, 114, 144, 120, 152, 180) in addition to the 1024 sized icon that we upload to iTunesConnect.

In practice, though, I just design the large 1024-sized icon, then manually resize the icon to all of those other sizes and put them in an asset catalog.

That seems like pointless busy work. Is it possible to just give Xcode my 1024x1024 icon and let the tools autoresize it to a smaller version?

like image 413
Dan Fabulich Avatar asked Sep 02 '25 02:09

Dan Fabulich


1 Answers

The macOS Terminal can really help you here.

If you wanted to resize an image named myicon1024x1024.png to an image of the same filetype, but 72x72, open Terminal, use the cd command to change directories to where your myicon1024x1024.png image is, then execute this command:

sips -z 72 72 myicon1024x1024.png --out myicon72x72.png

The "sips" command has a lot of other options, which can be googled or learned from its man page.

You can also make a bash script which could take the input of your file's name, then call sips once for each icon size you want to create. Of course, the output of this bash script ends up being the same as what you would get from makeappicon.com, so you'd still have to move the files into Xcode.

like image 159
Kaelan Dawnstar Avatar answered Sep 04 '25 21:09

Kaelan Dawnstar