My app icon is not displayed correctly on iOS. But my app icons are in AppIcon.appiconset

Kim Strasser 1,036 Reputation points
2024-06-23T11:51:42.26+00:00

I have added my app icons on my iMac to my iOS project in Assets.xcassets-->AppIcon.appiconset. After that I copied my iOS project to my Windows 11 laptop and then I paired Visual Studio with my iMac to debug the iOS project on my iPad. But the problem is that my app icon is not displayed. Another app icon is displayed instead.In addition, I can see my 16 app icons when I click in my iOS project on Asset Catalogs-->Assets-->AppIcon.

In addition, I get this in the output window in VS:

C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.2.8053\tools\msbuild\iOS\Xamarin.Shared.targets(885,3): warning : The app icon set "AppIcon" has 16 unassigned children.

Why is my app icon not displayed on my iPad? I use Visual Studio version 17.10.2.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,579 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Kim Strasser 1,036 Reputation points
    2024-06-26T21:55:27.81+00:00

    I have tried to click on the meatballs menu at the top-right of each icon. I have added the same 16 icons but the Contents.json file didn´t changed. The images were not added to the file.

    I have a copy of my iOS project on my iMac and there I opened my Contents.json file and I copied everything from this file to my Contents.json file on my Windows laptop and now my icon gets displayed on my iPad.

    For example:

    {
      "images" : [
        {
          "filename" : "40.png",
          "idiom" : "universal",
          "platform" : "ios",
          "scale" : "2x",
          "size" : "20x20"
        },
    
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.