Set alternate app icons in iOS using Xamarin
Since the release of iOS 10.3 developers are able to change the app icon from your app programatically. Although it can’t be used to create a dynamic icon (like the Calendar or Clock-app), we are given the opportunity to ship the app with more than one kind of icon so the user will be able to change that. The official MLB At Bat and NHL apps on iOS used this to change the icon of their app to change the app’s icon to their favorite team’s logo.
Xamarin released their support of iOS 10.3 pretty quickly after the release from Apple, making this functionality available for Xamarin.iOS developers as well (they called it adaptive icons). Let’s see how we can use this to set alternate app icons in iOS using Xamarin.
The goal in the sample would be that we’ll be able to change the app icon of the app so the user can choose between three different icons to be displayed on the springboard. We’ll be using the
setAlternateIconName method that’s available in iOS 10.3 to achieve this goal. The source code can be found on Github in case you directly want to dive into the code. Otherwise, read on!