A shell script that converts an iOS application icon to all required sizes
The script helps iOS app developers generate app icons in all sizes required by Xcode. It takes a high resolution icon (preferably in PNG) and creates multiple resized copies of it.
The script was tested only on macOS.
The script uses ImageMagick to resize the images. If you don't have ImageMagick installed, you'll have to install it first. Follow the download and installation instructions on its website at https://imagemagick.org/
Once you have ImageMagick installed, just download the generate-iOS-appicons.sh file or clone this repository to your machine to any directory.
The script generates the files in the current working directory. You will frequently want your resized icons to be in the same directory as your original high resolution icon, in this case you'll need to execute the script from that directory. The script takes just one command line argument: a file with your high resolution icon.
$ cd /path/to/high/res/icon
$ /path/to/the/script/generate-iOS-appicons.sh high-resolution-icon.png
After executing the script, you'll see the following smaller resolution files in the working directory:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
That's it! You can then go ahead and add them to your assets catalog in Xcode.