Search code examples
xamarin.iosinfo.plistios-icons

xamarin ios publish error - Missing Info.plist value - A value for the Info.plist key 'CFBundleIconName' is missing


I've been trying to fix this for days now. Using Xamarin and Visual Studio, I deleted the asset catalogs/media folder then I used app icon set creator to create the icons. I then went into info.plist under visual assets and hit add catalog, then dragged the icons into the slots.

No matter how many times I try this I get the same error.

Does anyone know how to fix this?

thanks!!!!

Missing Info.plist value - A value for the Info.plist key 'CFBundleIconName' is missing in the bundle


Solution

  • It seems you have used Asset Catalog to create your app's icons. You have to add all the icon files in the AppIcons of Media Catalog, because after XCode 9 we need to provide App Store icon sized 1024x1024 within the Xcode itself.

    After doing that, you can add the CFBundleIconName key in your info.plist:

    <key>CFBundleIconName</key>
    <string>AppIcon</string>
    

    But there may be an error on Visual Studio 2017 15.6+ when we add Asset Catalog. Open your info.plist you will see

    <key>XSAppIconAssets</key>
    <string>Resources/Media.xcassets/AppIcons.appiconset</string>
    

    Then look at your project's folder you will find your Catalogs file Media.xcassets locating in your root project directory outside of Resources folder. So we need to modify the key XSAppIconAssets to show the icons:

    <key>XSAppIconAssets</key>
    <string>Media.xcassets/AppIcons.appiconset</string>
    

    This post lists more solutions about the same issue. You can refer to it for more details.