<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Amitsharan on Medium]]></title>
        <description><![CDATA[Stories by Amitsharan on Medium]]></description>
        <link>https://medium.com/@amitsharan2017?source=rss-2920cb09c678------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ZRFDIVRyGAcUKSre</url>
            <title>Stories by Amitsharan on Medium</title>
            <link>https://medium.com/@amitsharan2017?source=rss-2920cb09c678------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 20:37:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amitsharan2017/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[XamariniOS-ChangeAppIcon Programmatically]]></title>
            <link>https://medium.com/@amitsharan2017/xamarinios-changeappicon-programmatically-80abce00ae10?source=rss-2920cb09c678------2</link>
            <guid isPermaLink="false">https://medium.com/p/80abce00ae10</guid>
            <dc:creator><![CDATA[Amitsharan]]></dc:creator>
            <pubDate>Thu, 09 Feb 2023 19:13:44 GMT</pubDate>
            <atom:updated>2023-02-09T19:13:44.341Z</atom:updated>
            <content:encoded><![CDATA[<p>Using Dependency Service we can Do this so first we start with interface creation in our portable projects.</p><p>public interface IAppIconSwitchService</p><p>{</p><p>Task SwitchAppIcon(string iconName);</p><p>}</p><p><strong>and in MainPage.xaml</strong></p><p>async void Xamarin_Button_Clicked(System.Object sender, System.EventArgs e)</p><p>{</p><p><strong>var iconSwitcher = DependencyService.Get&lt;IAppIconSwitchService&gt;();<br>await iconSwitcher.SwitchAppIcon(null);</strong><br>}</p><p>async void Maui_Button_Clicked(System.Object sender, System.EventArgs e)</p><p>{<br><strong>var iconSwitcher = DependencyService.Get&lt;IAppIconSwitchService&gt;();<br>await iconSwitcher.SwitchAppIcon(“MauiLogo”);</strong></p><p>}</p><p>using System;</p><p>using System.Threading.Tasks;</p><p>using AppIconUpdater;</p><p>using AppIconUpdater.iOS;</p><p>using UIKit;</p><p>using Xamarin.Forms;</p><p>[assembly: Xamarin.Forms.Dependency(typeof(AppIconSwitchService))]</p><p>namespace AppIconUpdater.iOS</p><p>{</p><p>public class AppIconSwitchService : IAppIconSwitchService</p><p>{</p><p>public async Task SwitchAppIcon(string iconName)</p><p>{</p><p>if (UIApplication.SharedApplication.SupportsAlternateIcons)</p><p>{</p><p>if (iconName == “MauiLogo”)</p><p><strong>await UIApplication.SharedApplication.SetAlternateIconNameAsync(iconName);</strong></p><p><strong>else</strong></p><p><strong>UIApplication.SharedApplication.SetAlternateIconName(null, (error) =&gt; { Console.WriteLine(error); });</strong></p><p>}</p><p>}</p><p>}</p><p>}</p><p>Follow @ <a href="https://codexamarin.blogspot.com/2021/01/xamarinios-changeappicon.html">https://codexamarin.blogspot.com/2021/01/xamarinios-changeappicon.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80abce00ae10" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>