Missing Info.plist value (CFBundleIconName) after Xamarin update. How can I fix it?
Asked Answered
L

4

12

After updating my Xamarin, xCode on my mac and trying to upload to App Store, I get this kind of e-mail from Apple:

Missing Info.plist value - A value for the Info.plist key 'CFBundleIconName' is missing in the bundle 'com.xxxx.yyyy'. Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for this Info.plist key. For more information see http://help.apple.com/xcode/mac/current/#/dev10510b1f7. Once these issues have been corrected, you can then redeliver the corrected binary.

As I understand I need to convert my icons to Asset Catalog, but I have no idea how can i do it in Visual Studio 2015(Windows)? This is the part of my info.plist:

<key>CFBundleDisplayName</key>
<string>Name - Online</string>
<key>CFBundleIdentifier</key>
<string>com.xxxxx.xxxxxx</string>
<key>CFBundleVersion</key>
<string>3.4</string>
<key>CFBundleIconFiles</key>
<array>
    <string>[email protected]</string>
    <string>Icon-72.png</string>
    <string>[email protected]</string>
    <string>Icon.png</string>
    <string>[email protected]</string>
    <string>Icon-76.png</string>
    <string>[email protected]</string>
    <string>Default.png</string>
    <string>[email protected]</string>
    <string>[email protected]</string>
    <string>Default-Landscape.png</string>
    <string>[email protected]</string>
    <string>Default-Portrait.png</string>
    <string>[email protected]</string>
    <string>[email protected]</string>
    <string>Icon-Small-50.png</string>
    <string>Icon-Small-40.png</string>
    <string>[email protected]</string>
    <string>Icon-Small.png</string>
</array>
<key>CFBundleShortVersionString</key>
<string>4.4</string>
Lobbyist answered 8/10, 2017 at 13:16 Comment(0)
S
14

I had exactly the same issue. Bascially this helped me resolve the problem: https://github.com/MobiVM/robovm/issues/210

  1. Right click info.plist, choose "Open with ..." and pick "iOS Manifest Editor".
  2. Go to Visual Assets tab and choose "Use Asset Catalog"
  3. After saving, go to your project in solution explorer and you should see Asset Catalogs folder. Open it and double click on Media.
  4. Go to AppIcons and provide all necessary icons for the platforms you are building for. Make sure that you also include the App Store icon which is 1024x1024 pixels. If you miss any that are required, you will be alerted when uploading your .ipa file to iTunes Connect.

  5. Edit info.plist again, but now open it in XML editor. Add the following:

    <key>CFBundleIconName</key>

    <string>AppIcons</string>

  6. Comment out the CFBundleIconFiles array. In my case it was:

    <!--key>CFBundleIconFiles</key> <array> <string>[email protected]</string> <string>Icon.png</string> <string>[email protected]</string> <string>[email protected]</string> <string>Icon-Small.png</string> <string>[email protected]</string> </array-->

After that you should be able to upload to the Apple store.

Strappado answered 31/10, 2017 at 13:54 Comment(4)
Excellent, your solution worked for me however <string>AppIcon</string> should have been <string>AppIcons</string> to match the catalog group name. Otherwise you get a bunch of other errors.Gallia
Also, the Media.xcassets folder must be in Resources folder. If not, open explorer and move it. Then edit .csproj file and update all paths that reference to Media.xcassets. Every time you add another catalog in Media.xcassets you must manually move it to Resources.Pulido
Thanks, I was stuck on this for hours. I had to upgrade to the latest version of Xamarin Tools for Visual Studio, which is odd because I have definitely upgraded multiple times since this answer was written.Infiltration
This worked me on to the next error ITMS-97017 but hey that's progress. It has to be said that you must make sure you include the new Assets.xcassets and it's contents in the project. I'm using Visual Studion 2017 for Windows.Alonaalone
B
5

If anyone is here after upgrading to 16.10 visual studio, asset catalogs publishing is selectively broken on some projects. Do not go through the fixes above if you are using the apple store as you have to have an asset catalog to submit. I uninstalled Visual Studio 2019 and went back to an older version (randomly selected 16.8.6) and everything started working beautifully with meaningful warning messages I hadn't seen in wasted days of frustration. If you are using adhoc, then the above would work, but I would recommend the version downgrade and waiting until they pause Maui long enough to make Xamarin a viable product again. It seems like 6 months since I could publish through visual studio... NOW, I couldn't even push an IPA from my mac before the downgrade.

Bey answered 3/6, 2021 at 8:12 Comment(2)
I have the exactly same problem. Did you downgrade on visual studio in mac or in windows version?Gail
An alternative is to distribute the app using Visual Studio for Mac: xamarinexpert.it/…Hypogenous
C
2

In Visual Studio 2017 I had the same problem. Month ago I switched to the asset catalogs where I store my icons and launch images. I was able to upload my app. Now I wanted to update my app again and I got the error message - Missing Info.plist value... In Visual Studio I navigate through the different Info.plist settings and I saw that the sources in the Visual Assets tab were set to none

enter image description here

I changed the sources and I was able to upload my app successfully to the store without any error message

Chemesh answered 1/8, 2018 at 7:24 Comment(0)
C
1

On Visual Studio Mac this is simpler. Double click on Info.plist and go to Application tab. You will see that there is a button called "Migrate to Asset Catalogs" next to "Source". Once you click that CFBundleIconFiles will be removed and replaced with the settings. Now you need to select catalog elements from the dropdown lists as below in the screenshot and adjust your Asset catalog icons.

enter image description here

Chiropteran answered 13/1, 2022 at 22:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.