Search code examples
maui

Splashscreen icon not showing


In my .NET MAUI App, I have an SVG that I wanted to use as my Splashscreen-Icon

...
<MauiSplashScreen Include="Resources\Splash\mysplash.svg" Color="#000000" BaseSize="128,128" />
...

When I change to the following in the .csproj of my App, I can just see a black screen on iOS (in iPhone 14 iOS 16.2 Emulator). The background should be black, yes. But, I should also show my SVG.

On Android, I even do not see the splash-screen at all. Is there something, I am missing?


Solution

  • From the docs Add a splash screen to a .NET MAUI app project:

    1. You need to add your own svg file for the splashscreen, e.g. mysplashscreen.svg to replace the default splash.svg
    <ItemGroup> 
          <!-- Splash Screen -->
         <MauiSplashScreen Include="Resources\Splash\mysplashscreen.svg"  Color="#000000" BaseSize="128,128" />
    
    
    1. The build action of mysplashscreen.svg file the must be manually set to MauiSplashScreen in the Properties window if it' s not being automatically changed.

    2. On iOS, when switching the simulator to the verison: iOS 16.0, the SplashScreen can be shown as expected, see below output:

    iOS:

    enter image description here

    Android:

    enter image description here