When you release your app, you are required to provide your app’s icon in a lot of different sizes. I had downloaded a program (called Prepo) that resized my icons to all the appropriate sizes, but now with stickers and other message extensions we need a whole new list of icons sizes.
I had used sips before to mass-resize everything in a folder, and I found code online to resize icons to all the original iOS icons sizes. Below is what I got when I tweaked it a little to work for the new message icons sizes. This can easily be changed to whatever sizes you need.
if [ $# -gt 0 ]; then sips $1 -z 90 120 --out email@example.com sips $1 -z 135 180 --out firstname.lastname@example.org sips $1 -z 100 134 --out email@example.com sips $1 -z 110 148 --out firstname.lastname@example.org sips $1 -z 40 54 --out email@example.com sips $1 -z 60 81 --out firstname.lastname@example.org sips $1 -z 48 64 --out email@example.com sips $1 -z 72 96 --out firstname.lastname@example.org echo "Done." else echo "You must provide the name of an image file to process." fi
So how do you use it? Well that’s pretty easy!
First, save the code above to a file. Mine is called icons.sh
Next, open Terminal (it’s in your applications, in the utilities folder.) Now you need to change to the directory that your icons.sh file is saved in. I tend to work on my desktop and then move files to folders later when I’m done. You change directory by typing cd so I would type:
Now you run the script.
Notice the ./ before my script’s name, and the path to the graphic file after it. You don’t have to type out the entire path to your graphic if you don’t want, after typing the ./icons.sh and a [space] you can drag and drop the file into terminal and it will automatically insert the path.
All the icon files will be saved to the same place as your icons.sh file, in my case the desktop.