This shell script creates app icon assets for iOS, watchOS, tvOS (alpha), MacOS, iTunes, Messages & Distribution for XCode 10 from just one file
- createImageAssets.sh for creation of App Icon Assets
- resizeAssets.sh for creation of Image Asset (@1x, @2x, @3x)
This script depends on ImageMagick
In Terminal:
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
$ brew install imagemagick
Download and unzip XCodeImageAssets
In Terminal:
$ sudo cp -Rf XCodeImageAssets /usr/local/
$ ln -sf /usr/local/XCodeImageAssets/createImageAssets.sh /usr/local/bin/createImageAssets.sh
$ ln -sf /usr/local/XCodeImageAssets/resizeAssets.sh /usr/local/bin/resizeAssets.sh
createImageAssets.sh:
$0 <source_file>
$0 <source_file> <output_dir>
resizeAssets.sh:
$0 <source_dir> <output_dir>
This script generates XCode app icon assets for the following from a single image file.
iOS, watchOS, tvOS, macOS, iTunes, Messages & Distribution
<source_file> - The source image file, should be at least 1024x1024px in size (preferably 1536x1536px). <output_dir> - The destination path where icons will be generated.
After export simply replace the directory in the assets file for the desired OS
This script generates image assets (x1 x2 x3) to be used in iOS apps etc.
<source_dir> - The source image directory. Images inside it is in @3x sizing. <output_dir> - The destination path where assets will be generated.
Image files with names ending with "Template" (e.g. "IconPlusTemplate.png") will be converted into template image sets.
Arthur Krupa - resize-mobile-assets (https://github.com/arthurkrupa/resize-mobile-assets)
This script is licensed under the terms of the MIT license.