You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Xamarin iOS发布报错:Info.plist缺少CFBundleIconName值求解决

Fixing "Missing Info.plist value - CFBundleIconName" in Xamarin + Visual Studio

Hey there, I’ve run into this exact CFBundleIconName error a few times when working with Xamarin iOS apps, so let’s walk through some practical fixes to get you past this:

1. Manually Add CFBundleIconName to Info.plist

Sometimes the visual editor in Visual Studio fails to auto-populate this key, even when you set up the icon set. Here’s how to fix it:

  • Right-click your Info.plist file and select Open With > XML (Text) Editor
  • Inside the <dict> section, add these lines (replace AppIcon with your actual icon set name if it’s different):
    <key>CFBundleIconName</key>
    <string>AppIcon</string>
    
  • Save the file and close the text editor.

2. Verify Your Asset Catalog Icon Set Configuration

Double-check that your icon set is properly set up in the Asset Catalog:

  • Open your Assets.xcassets file (or the catalog you created)
  • Select your icon set (e.g., AppIcon) and confirm all required icon sizes have been imported correctly (no missing placeholders)
  • Right-click the icon set and choose Show in Finder, then open the Contents.json file. Make sure each entry has a valid filename and matches the size requirements for iOS. If the App Icon Set Creator generated a wonky JSON, you might need to regenerate the icon set or tweak the file manually.

3. Clean, Clear Caches, and Rebuild

Cached build files often cause weird issues like this. Let’s do a full reset:

  • In Visual Studio, go to Build > Clean Solution
  • Navigate to your project’s root folder and delete the bin and obj folders (these hold cached build artifacts)
  • Go back to Visual Studio and select Build > Rebuild Solution

4. Double-Check Info.plist’s Visual Resource Settings

Make sure the visual editor is actually linking to your correct icon set:

  • Open Info.plist in the visual editor and go to the Visual Resources tab
  • Under App Icons, check that the Source dropdown is set to your icon set (not empty or pointing to a deleted folder)
  • If it’s not selected, choose your icon set from the dropdown and save the changes.

5. Validate the Final Bundle

After rebuilding, let’s confirm everything is in place:

  • Find your generated .app bundle (usually in bin/iPhone/Debug or Release folder)
  • Right-click it and select Show Package Contents
  • Check that Assets.car exists (this is the compiled Asset Catalog)
  • Open the bundled Info.plist and verify the CFBundleIconName key is present and has the correct value.

If none of these steps work, try creating a brand new Asset Catalog from scratch, reimporting your icons, and re-linking it to Info.plist. Updating Xamarin and Visual Studio to the latest stable version can also help, as older versions sometimes have bugs with Asset Catalog handling.

内容的提问来源于stack exchange,提问作者solarissf

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 08:49:21