Moshe Raab
Moshe Raab

Reputation: 157

Indicated icon for MAUI iOS does not appear on iOS device

I am using MAUI to create a multiplatform app. The app runs fine on Windows, Android and iOS. The problem I am encountering is that while the icon and splash screens show up fine on the Windows and Android devices, I get a generic blue-background .NET icon on the iOS device (iPAD). I have tried PNG and SVG formats, but the generic icon still appears as the splash screen and the application icon. I am out of ideas of how to get the proper icon show up on the iOS device.

Upvotes: 0

Views: 682

Answers (2)

Shuowen He-MSFT
Shuowen He-MSFT

Reputation: 692

Maui has platform-specific configurations for icon settings. For iOS, in addition to adding the icon file to Resources -> AppIcon folder and setting the properties to MauiIcon, you also need to configure it in Platforms\iOS\Info.plist:

  1. Open with Source Code(Text) Editor.
  2. Set the XSAppIconAssets key's string with icon file name(The converted name does not include the path or extension). For specific setting details, you can refer to iOS icon configration

In addition, the easiest way to change the icon is by removing the project's default icon in Resources -> AppIcon, adding your icon to this folder, and changing the icon file name to appicon (if you have foreground image, change its name to appiconfg), then setting the appicon's property to MauiIcon. In this way, it's not necessary to configure the settings for each platform anymore.

Upvotes: 0

Gerald Versluis
Gerald Versluis

Reputation: 34083

Are you deploying your iOS app from a Windows machine, not using a Mac? In other words, are you using Hot Restart?

If you are, that is the reason why. Under Limitations in the documentation on of the bullets says:

Asset catalogs aren't supported. When using Hot Restart, your app will show a .NET icon and launch screen.

This is because of how Hot Restart works. Hot Restart uses a pre-built app container that will be used to inject your .NET MAUI app in. But that means at that point the icon and splash screen cannot be changed anymore.

If you would release the app, the icon and splash screen should show up fine.

Upvotes: 0

Related Questions