How to Change the Default .NET Logo and Splash Screen on an iPhone iOS .NET MAUI

DOTNETVIC 0 Reputation points
2023-02-06T03:55:53.9666667+00:00

Does anyone know why the app icon and splash screen will not change in debug mode on my Local Device, iPhone 12 Max pro? I do not have an Android phone to test with but the icon and splash screen do change on the emulator.

This is how the .csproj is configured with the new svgs.

Do I need to change something in the info.plist file?

<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\citizenshipicon.svg" Color="#512BD4" />

<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splashscreen.svg" Color="#512BD4" BaseSize="128,128" />
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,399 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,903 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 26,451 Reputation points Microsoft Vendor
    2023-02-06T08:59:48.9833333+00:00

    Hello,

    Do I need to change something in the info.plist file?

    Yes. You could open Info.plist and find the key named "XSAppIconAssets",then set Assets.xcassets/citizenshipicon.appiconset as the value.(The default value is Assets.xcassets/appicon .appiconset, try to replace it with yours)

    Then you can delete the default appicon.svg, appiconfg.svg, make sure the build action of the image named "itizenshipicon.svg" is MauiIcon, clean the bin/obj folder, uninstall the app from your device and re-deploy the app to your device to see the new icon.

    Another issue is to change your splash screen.
    splashscreen.svg is the same name as the default splash screen, you should make sure the default file has been removed. You could check if there is only one image whose build action is MauiSplashScreen in the project. And you don't need to change something in the info.plist file for splash screen.
    In addition, you could try to debug the app on iOS simulator to see if the icon and splash screen can be changed.
    For more details, you can refer to Change the app icon - .NET MAUI | Microsoft Learn
    Add a splash screen to a .NET MAUI app project - .NET MAUI | Microsoft Learn


    Update

    Also, I noticed that I am not dependent on my Mac. I think it set it up the first time and now I am using the Local Device menu tab -> iPhone name appears there.

    It means that you are using HotResart,. There are some limitations, .NET MAUI apps that use iOS asset catalogs are currently unsupported by hot restart. You can connect your device to your MAC, and pair to Mac, then select your device from Remote Device (not Local Device menu tab) and check if the issue still exists.

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.