This script assumes cordova application uses app/res/icons/ios
directory for icon assets.
- Install
appicon_generate
gem using bundler (refer to this) -
- Put
gen_xml.rb
in the same directry with Gemfile
- Put
- Use
appicon_generate
to generate icons for ios - Run
./gen_xml.rb
to generate related xml tags
Sample output:
<icon src="app/res/icons/ios/Icon-40.png" width="40" height="40" />
<icon src="app/res/icons/ios/Icon-40@2x.png" width="80" height="80" />
<icon src="app/res/icons/ios/Icon-40@3x.png" width="120" height="120" />
<icon src="app/res/icons/ios/Icon-60.png" width="60" height="60" />
<icon src="app/res/icons/ios/Icon-60@2x.png" width="120" height="120" />
<icon src="app/res/icons/ios/Icon-60@3x.png" width="180" height="180" />
<icon src="app/res/icons/ios/Icon-72.png" width="72" height="72" />
<icon src="app/res/icons/ios/Icon-72@2x.png" width="144" height="144" />
<icon src="app/res/icons/ios/Icon-76.png" width="76" height="76" />
<icon src="app/res/icons/ios/Icon-76@2x.png" width="152" height="152" />
<icon src="app/res/icons/ios/Icon-Small-50.png" width="50" height="50" />
<icon src="app/res/icons/ios/Icon-Small-50@2x.png" width="100" height="100" />
<icon src="app/res/icons/ios/Icon-Small.png" width="29" height="29" />
<icon src="app/res/icons/ios/Icon-Small@2x.png" width="58" height="58" />
<icon src="app/res/icons/ios/Icon-Small@3x.png" width="87" height="87" />
<icon src="app/res/icons/ios/Icon.png" width="57" height="57" />
<icon src="app/res/icons/ios/Icon@2x.png" width="114" height="114" />