Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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>
like image 997
Vitali Avatar asked Oct 08 '17 13:10

Vitali


2 Answers

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.

like image 90
Victor Thomas Wilcox Jr. Avatar answered Sep 28 '22 11:09

Victor Thomas Wilcox Jr.


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.

like image 36
Michal B. Avatar answered Sep 28 '22 10:09

Michal B.