Search code examples
iosmaui

.ipa File Not Including App Icon or Applying CFBundleIconName in .NET MAUI App


I'm working on a .NET MAUI app using Visual Studio on Windows, and I'm trying to upload the .ipa file to the App Store using Transporter on a Mac in the cloud. However, I'm running into two issues:

  1. The app icon is not being included in the build.
  2. The CFBundleIconName from the Info.plist is not being applied.

My Setup

  • App Icon:
    All required icon sizes are located in Resources\AppIcon.
    The folder contains all the necessary PNG files (e.g., icon16.png, icon32.png, icon512.png, etc.) along with the base appicon.svg.
    The Build Action for each file is set to MauiImage.
    My .csproj includes the following line for the app icon:

    <MauiIcon Include="Resources\AppIcon\appicon.svg" />
    
  • Info.plist:
    The file includes a CFBundleIconName key with the correct app name.

  • Splash Screen:
    The splash screen is working as expected and is located at Resources/Splash/dart_splash.png.

What I’ve Tried

  • Verified all icon sizes and ensured their Build Action is set to MauiImage.
  • Confirmed the CFBundleIconName is present and correctly set in Info.plist.
  • Checked the .csproj file for correct inclusion of icons and splash screens.
  • Built the .ipa without errors in Visual Studio.

Environment Details

  • Development OS: Windows with Visual Studio 2022.
  • Mac: Cloud-hosted environment for building the .ipa and uploading via Transporter.
  • Framework: .NET MAUI targeting iOS.

Issues

  1. When I upload the .ipa file, the app icon doesn’t appear in the App Store.
  2. The app name doesn’t reflect the value of CFBundleIconName.

Question

What could I be missing in my configuration that prevents the app icon from being included and the CFBundleIconName from being applied? Any suggestions or troubleshooting steps would be appreciated.

the errors i get are below enter image description here


Solution

  • I would suggest to follow the official documentation provided regarding setting your app icon for iOS

    In .NET MAUI, by default the info.plist contains <key>XSAppIconAssets</key> and it' value as Assets.xcassets/appicon.appiconset.

    So, Whatever you define as MauiIcon in your .NET MAUI app will be used to generate asset catalog icon set for both iOS and macOS. (So app icon set is generated automatically by MAUI).

    There is no need for extra configuration like setting CFBundleIconName.

    In you case, you defined MauiIcon like below

     <MauiIcon Include="Resources\AppIcon\appicon.svg" />
    

    Few things to note:

    1. There is no Color property defined. The documentation clearly mentioned to define a Color to avoid an error during App Store Connect verification.
    2. Remove the CFBundleIconName key defined in info.plist and make sure it contains XSAppIconAssets and it's value as Assets.xcassets/appicon.appiconset

    Note: Make sure below mentioned point in documentation

    The Info.plist file contains a <key>XSAppIconAssets</key> entry, with a corresponding <string> node defined after it. The value of this <string> node follows this format: Assets.xcassets/{name}.appiconset The value for {name} is derived from the .NET MAUI project file's <MauiIcon> item, specifically the file name defined by the Include attribute, without its path or extension.