8.1 The app icon
A prominent app icon is an important feature. Despite of its small size, there are extensive style guides for all platforms. Since app design is out of scope of this guide, we only focus on adding an existing icon to a Xamarin.Forms app.
On iOS we first need to convert the icon into different resolutions. The following Bash script converts the original image “xamarin.png” into several “icon*.png” images.
for width in 57 114 120 72 144 76 152 29 58 50 100 40 80
convert xamarin.png -resize $size\> -background transparent -gravity center -extent $size icon$size.png
These images are then set as app icons, spotlight and settings icons: We open the iOS project options go to Build → iOS Application → Universal Icons and load the icons.
On Android we first add the icon file to the “Resources/drawable” folder. Then we set it as the new app icon: We open the Android project options, go to Build → Android Application → Application icon and use the drop down menu.