How to add 167x167 icon for iPad app?

Building an iPad app with Xamarin Studio on a mac. Just this week I have begun to get an error: "Missing required icon file, the bundle does not contain an app icon of exactly 167x167 pixels in png format.

The problem is that my app does contain this icon, but the App store does not see it. Xamarin studio has slots for 4 icons, but it does not include one for this size. How do I add this icon to my bundle so that I can publish my app. My xamarin subscription is worthless if I can't publish apps.

Thanks,
Gerry

Best Answers

Answers

  • GerryRempelGerryRempel CAMember ✭✭

    Xamarin developer support. The Xamarin studio is broken for ipad app development. Please help.

  • GerryRempelGerryRempel CAMember ✭✭

    I switched from using the asset catalog, and added the icon file to my Resources directory, It was in "Resources\Images". I edited the info.plist file in a text editor and this time the app store accepted my upload.

    Does it matter that my icon file is called "Icon-167.png" instead of "Icon-83.5@2x.png"?

    Thanks

  • GerryRempelGerryRempel CAMember ✭✭

    The problem with this solution is, I can't get the 167x167 icon into an asset catalog. When I press "Migrate to Asset Catalog" the icon does not transfer. If I try adding it manually to the asset catalog, it ends up not being listed in the "contents.json" file, and if you try to edit that file it won't compile. Why don't you fix the bug in Xamarin Studio, so that 167 is the fifth icon choice and it can be placed in asset catalogs properly?

    Thanks,

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited February 2016

    In fact it looks like the engineers have just replied on the bug to record that the Info.plist icon editor is no longer being updated for newer versions of iOS. So the recommended workflow is to use asset catalogs. Since the old Info.plist editor never supported the 167x167 icon size, I think it is probably the expected behavior that it wouldn't automatically migrate that size into the asset catalog.

    But hopefully once you've removed the manually-added entry in the Info.plist, removed the manually added Icon-167.png, and then re-added the icon into the asset catalog using the asset catalog editor, it should all work as expected. (I tested this workflow very briefly in a new from template app, and it worked OK there: the icon appeared correctly on the iPad Pro simulator. That said, don't hesitate to file a quick bug report if you notice a particular scenario that doesn't work as expected.)


    I will double-check with the documentation team to make sure this recommendation is properly recorded in the documentation too.

  • GerryRempelGerryRempel CAMember ✭✭

    Brendan,

    I'm not sure if its clear, but I am using Xamarin Studio on a mac, I am not using Visual Studio for this project. So I'm not sure which asset catalog editor you are talking about. Does this exist in Xamarin Studio? or is it a Visual Studio thing? or is it something you do in Xcode?

    In Xamarin Studio, when you press Migrate to Asset Catalog, 4 of the icons move. It then creates an "AppIcons.appiconset" folder under "Images.xcassets". You can then add images to this folder, but they won't be found as icons when you try to upload the app to the app store.

    Did you test the workflow using Visual Studio?

    Thanks,

  • GerryRempelGerryRempel CAMember ✭✭

    Brendan,

    Thank you. Double clicking on the contents.json was the step I was missing. Now, my icons are all happily back in the asset catalog.

  • MarcoTMarcoT USMember ✭✭

    Hi @BrendanZagaeski
    I migrated to the asset catalog but I still have the same problem.
    Application Loader continues to tell me the icon 167x167 is missing (but I have filled all the icons inside the asset catalog).

    This is my appicons...and it seems that here there isn't a 167x167 icon.

    I see this if I open the solution with Visual Studio 2013.
    If I open the app from VS 2015, I can't see the asset catalog.

    I think that the asset catalog doesn't work very well with VS, but as you wrote before, this can be considered the only method (because the other is pratically deprecated).

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    @MarcoT, I tested quickly creating a new "Visual C# -> iOS -> Universal -> Single View App (iOS)", then right clicking the "Asset Catalogs" item in the Solution Explorer, selecting "Add Asset Catalog", clicking "Add", and then opening the "AppIcons" section of the new asset catalog.

    In that scenario the entry element for the 167x167 iPad Pro icon appeared as expected:

    image

    (I tested briefly on both VS 2013 and VS 2015, using the latest Stable XamarinVS 4.0.1.96.)

    Next steps

    If trying this "new from template" test doesn't produce the same result on your system, or if it does work but the difference in your original project that causes the problem isn't easy to spot based on a comparison against the "new from template" project, feel free to send in an email via "Business & Enterprise Support" for further one-on-one troubleshooting. Thanks in advance.


    If I open the app from VS 2015, I can't see the asset catalog.

    If by chance you are using a non-English language for the user interface in VS 2015, that could be the problem. I just recently filed a non-regression bug for that scenario:

    • Bug 38427 - The Asset Catalog entry is not displayed in the Solution Explorer when the Visual Studio UI is set to a language other than English
  • MarcoTMarcoT USMember ✭✭

    Hi @BrendanZagaeski
    thank for your reply,

    I tested it here with my computer office and it seems to work fine (english language), but with my home computer I have these problems (I don't remember but I'm quite sure that the language is Italian).

  • JohnHairJohnHair GBMember ✭✭✭✭

    I am also getting this error, however I am using an asset catalog and have just added a 167x167 image.

  • JohnHairJohnHair GBMember ✭✭✭✭
    edited February 2016

    This is the relevant portion of my Contents.json file:
    {
    "filename": "167.png",
    "size": "83.5x83.5",
    "scale": "2x",
    "idiom": "ipad"
    },

    The size above looks incorrect to me, Ive changed it to 167x167 but that hasn't helped. I am unable to upload my new app to the store at all, dead in the water here. Any ideas?

  • JohnHairJohnHair GBMember ✭✭✭✭

    Finally got it working.
    The Contents.json as created by XS is correct. The issue was the build folder. After deleting that and rebuilding, XS created a correct build.

  • I migrated away from using the AssetCatalog in Xamarin as I had to rebuild the damn thing every second day when submitting to Apple. During testing the icon for the app would go missing on the simulator and when submitting to the AppStore all the icons would be reported as missing. Very frustrating.

  • Had the same problem and did not have option of adding 167x167 to the asset catalog. I then realised that I would need to update Xamarin Studio in for the iPad Pro image to be support via the asset catalog. So, I did that and could then add the image. However, I still got the error when submitting to AppStore. I then cleaned up build files and re-build. After fresh builds on top of cleaned build folders I successfully submitted the app. So, I believe it does work well with the AssetCatalog (though I also have the 167 image added as a BundledResource file in the Resource folder).

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    Thanks for the various reports of the problem where changes to the icons are requiring a clean and rebuild. As a cross-reference for that issue, I believe it will be solved by the eventual fix for Bug 39137.

  • GaryBeasleyGaryBeasley USMember ✭✭

    Hi Brendan!

    I am experiencing a problem in VS2013 when trying to save a newly added Asset Catalog.

    Can I just use the post above:

    (a) Rename the 167x167 icon file to Icon-83.5@2x.png, place it in the Resources folder, and make sure it has a build action of "BundleResource".

    I'm a newbie, so can you tell me how to make sure that I have a build action of BundleResource. I have been able to post IPA builds for the past several months until this past week. Now I'm getting the error from the App Loader about not having the 167x167 iPad icon.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    @GaryBeasley, yes I think in theory adding it as a BundleResource should work.

    One step I missed in my initial description of that approach is that I believe you will also need to manually edit the source of the Info.plist file to add a String entry for Icon-83.5@2x under the CFBundleIcons array.

    image

    how to make sure that I have a build action of BundleResource

    See https://developer.xamarin.com/guides/ios/application_fundamentals/working_with_resources/ for information about setting that option.


  • GaryBeasleyGaryBeasley USMember ✭✭

    Thanks Brendan.

    That sounds like it should work. I will try and respond with the results tomorrow.

    As far as bundling resources, I don't think I have that explicit option in VS2013. I don't use XS.

    Thanks again!

  • GaryBeasleyGaryBeasley USMember ✭✭

    Thanks Brendan. I added the new 167x167 file name Icon-83.5@2x.png to my resources folder, added the entry to the info.plist and everything uploaded just fine.

    Thanks for the help!!

  • BrianKresgeBrianKresge USMember

    I hope you got a response between now and then, but for my part, I had to manually update my info.plist file to include:
    CFBundleIconFiles~ipad

    td_sq_logo_167x167.png

    This seemed to do the trick with getting it to the App Store.

  • MichaelSlogedalMichaelSlogedal NOMember

    I'm having problems with this as well, still. Using Xamarin for visual studio 4.1.

    Adding 167x167 image to the "CFBundleIconFiles" section of info.plist works, but it's overwritten next time i edit property pages of the project.

    Assets don't work in Visual studio 2015, more specifically the "Contents.json" file that manages the "appicons" section is (almost) empty, so I don't get any choice which icons to upload.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    the "Contents.json" file that manages the "appicons" section is (almost) empty, so I don't get any choice which icons to upload

    Just as one little note, an empty AppIcons section can sometimes mean simply that none of the icon families have been enabled (set to True) in the Properties window. (See the attached image.)

  • RCWadeRCWade USMember ✭✭

    I have been dealing with this issue also using VS 2015.

    I have went back to using resource files, and manually editing the info.plist file. I am able to create a full set of icons in the Asset Catalogs, but in my case, they never get added to the ipa bundle when I build, and thus I get many missing icon errors, rather than only the error for the 167.

  • @RCWade said:
    I have been dealing with this issue also using VS 2015.

    I have went back to using resource files, and manually editing the info.plist file. I am able to create a full set of icons in the Asset Catalogs, but in my case, they never get added to the ipa bundle when I build, and thus I get many missing icon errors, rather than only the error for the 167.

    The same. With Xamarin Studio I was able to set iPad Pro icons in assets catalog. But there is no such option in Vistual Studio 2015 Update 3. Content.json contains necessary information but Application Loader reports that icons are missing.

  • edited August 2016

    Hey guys, I had the same issue. I've added the icon to the Asset Catalog and Resource in the iOS Project, but Application Loader still complained about the missing file. Turns out, there was a missing piece of code in the iOS.csproj. We noticed that all the icons had this, except the one for iPad Pro. So we added manually this piece:

    ImageAsset Include="Resources/Media.xcassets/AppIcons.appiconset/Icon167.png"
    InProject>false</InProject
    ImageAsset

    We also had to modify the Contents.json manually and add this:
    },
    {
    "scale": "2x",
    "size": "83.5x83.5",
    "idiom": "ipad",
    "filename": "Icon167.png"
    }
    FYI - we are using Visual Studio 2015 and this was the only solution that worked for us.
    Hope this is helpful for you guys.

  • faceoffers28faceoffers28 USUniversity ✭✭✭
    edited October 2016

    @BrendanZagaeski I'm now running into this error. I'm trying to Build a Universal app, but I'm getting the '167by167' error from the Application Loader.

    I'm running Visual Studio Enterprise 2015 Update 3 with Xamarin 4.0.4.4 and Xamarin.iOS 9.6.2.2. I really don't want to use the AssetCatalog or update Xamarin. I've got stable versions of all my Xamarin.Forms apps and I hate making environment changes.

    I tried the following (your Feb 16th response), but it didn't work.

    (a) Rename the 167x167 icon file to Icon-83.5@2x.png, place it in the Resources folder, and make sure it has a build action of "BundleResource".

    How do I incorporate your March 9th follow up? I don't see any easy way to do that with Visual Studio 2015.

    Any help is much appreciated. Thanks!

  • faceoffers28faceoffers28 USUniversity ✭✭✭
    edited October 2016

    @BrendanZagaeski OK, I was able to edit the file using the method found here.

    https://forums.xamarin.com/discussion/47933/working-with-localization-adding-keys-to-info-plist-visual-studio-xamarin-ios

    I then added this line to the existing code and it worked.

    <string>Icon-83.5@2x.png</string>

  • GVxGVx USMember ✭✭✭

    This was first bought up in February, and it is now October and I am running into the same error when creating a brand new project from scratch. Why has this issue not been flagged as HIGHLY important and fixed ??

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited October 2016

    this issue

    Which issue exactly are you thinking of? Here is a summary of the bug reports that are currently linked from this thread:

    • Bug 37945 is marked as "resolved answered" because the use of the Info.plist editor for icons has now been obsoleted by Asset Catalogs and is provided only for backwards compatibility. Adding a GUI for the 167x167 icon sizes (among other icon sizes) is theerfore not a design goal for that editor.

      • As mentioned on that bug, the Xamarin documentation about App Icons has been updated accordingly. That guide no longer mentions the use of Info.plist to manage icons. It instead says:

        If you have an existing Xamarin.iOS application using the Info.plist file to manage it's icons, it is highly suggested that you switch it over to use the Asset Catalog method.

    • Bug 38427 is marked as "verified fixed." The fix was released in XamarinVS 4.1 ("Cycle 7").

    • Bug 39137 is marked as "verified fixed." The fix was released in XamarinVS 4.1 + Xamarin.iOS 9.4 ("Cycle 7").

    To recommend another issue for investigation by the Xamarin team, please do file a new quick bug report:

    Thanks in advance!

  • GVxGVx USMember ✭✭✭
    edited October 2016

    @BrendanZagaeski said:

    this issue

    Which issue exactly are you thinking of? Here is a summary of the bug reports that are currently linked from this thread:

    Thanks in advance!

    Oh my issue was needing to add this line to plist whenever doing a rebuild.
    <string>Icon-83.5@2x.png</string>

    However it looks like we need to use Asset Catalogs so I will have a look into these. Thanks heaps for the reply as sometimes we can miss updates like this. ;)

    Edit: However when I follow the instructions to convert to Asset Catalogs, I do not get the option, it only allows me to select Don't use Asset Catalogs ... I have latest everything.. I am really lost now, so I will just keep adding this single line above to my plist whenever I do a build... :(

  • SebBartholomewSebBartholomew USMember ✭✭

    @OctavianIonCristea.6245 said:
    Hey guys, I had the same issue. I've added the icon to the Asset Catalog and Resource in the iOS Project, but Application Loader still complained about the missing file. Turns out, there was a missing piece of code in the iOS.csproj. We noticed that all the icons had this, except the one for iPad Pro. So we added manually this piece:

    ImageAsset Include="Resources/Media.xcassets/AppIcons.appiconset/Icon167.png"
    InProject>false</InProject
    ImageAsset

    We also had to modify the Contents.json manually and add this:
    },
    {
    "scale": "2x",
    "size": "83.5x83.5",
    "idiom": "ipad",
    "filename": "Icon167.png"
    }
    FYI - we are using Visual Studio 2015 and this was the only solution that worked for us.
    Hope this is helpful for you guys.

    Thanks for sharing @OctavianIonCristea.6245 I had this issue as well and had to manually add the missing
    <ImageAsset Include="Resources/Media.xcassets/AppIcons.appiconset/Icon167.png">
    <InProject>false</InProject>
    </ImageAsset>
    lines to my .csproj - however did not have to manually edit the Contents.json. I do wonder if there had been a merge mistake between developers at some point, but am surprised to not have had a build error or warning during build of this until attempting to validate for App Store.

  • AlexL.7433AlexL.7433 USMember
    edited December 2016

    Hi, guys!
    I've found the bug! Thanks to @OctavianIonCristea comment.
    I'm using VS2015(Xamarin 4.2.1.73) and Asset catalog AppIcons.
    All is fine, BUT in Resources\Media.xcassets\AppIcons.appiconset\Contents.json I had this string:
    {
    "scale": "2x",
    "size": "83,5x83,5",
    "idiom": "ipad",
    "filename": "167.png"
    }
    Note the commas instead dots in size

    Quick fix, replace commas with dots:
    {
    "scale": "2x",
    "size": "83.5x83.5",
    "idiom": "ipad",
    "filename": "167.png"
    }
    And now App Store validation is OK!

    EDIT:
    p.s. I have Russian locale on my computer.

  • AngelieriAngelieri USMember

    I do not use Asset catalog, so I just add inside Info.plist and worked.

    <key>CFBundleIconFiles</key> <array> <string>...</string> <string>Icon-167.png</string> ...

  • JamesHancock.1360JamesHancock.1360 USMember ✭✭

    This is a complete nightmare.

    1. It should only allow asset catalogs now.
    2. When converting it should copy the files into the asset catalog directory automatically.
    3. When adding an image it should name the image correctly and uniquely for each of the appicon assets.
    4. When adding an image it should automatically fill in all of the images (with unique file names) for all of the ones not yet filled in that have the same aspect ratio and size.
    5. It should also bicubic scale down any images that are the same aspect ratio but not yet filled in unless you tell it otherwise.

    It does none of these things and if you don't get it exactly perfectly named even in the asset catalogs it appears to not work and you get to waste 10-15 per build for the store only to find out that it has rejected it. (the build for store should validate all of these using whatever Apple's rules are too and fail precheck!)

  • It works for me Thanks.
    Hey @BrendanZagaeski

    @BrendanZagaeski said:
    @MarcoT, I tested quickly creating a new "Visual C# -> iOS -> Universal -> Single View App (iOS)", then right clicking the "Asset Catalogs" item in the Solution Explorer, selecting "Add Asset Catalog", clicking "Add", and then opening the "AppIcons" section of the new asset catalog.

    In that scenario the entry element for the 167x167 iPad Pro icon appeared as expected:

    image

    (I tested briefly on both VS 2013 and VS 2015, using the latest Stable XamarinVS 4.0.1.96.)

    Next steps

    If trying this "new from template" test doesn't produce the same result on your system, or if it does work but the difference in your original project that causes the problem isn't easy to spot based on a comparison against the "new from template" project, feel free to send in an email via "Business & Enterprise Support" for further one-on-one troubleshooting. Thanks in advance.


    If I open the app from VS 2015, I can't see the asset catalog.

    If by chance you are using a non-English language for the user interface in VS 2015, that could be the problem. I just recently filed a non-regression bug for that scenario:

    • Bug 38427 - The Asset Catalog entry is not displayed in the Solution Explorer when the Visual Studio UI is set to a language other than English
Sign In or Register to comment.