7
votes

I succesfully upload my app on xamarin forms but after it is uploaded i recieve this in an email from apple:

"Missing required icon file. The bundle does not contain an app icon for iPad of exactly '167x167' pixels, in .png format ."

So it wants an image in my resourcesfile i suppose (not in info.plist icons as they are not asking for 167x there) but should I name it: [email protected] or Icon-174.png?

5

5 Answers

10
votes

I've had this particular problem in the last couple of days.

The iPad icon didn't show within the Info.plist and kept giving the warning you're getting right now.

My fix was to manually add the icon [email protected] to the resources folder ( as Prashant pointed out ) and add this to the Info.plist:

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

I used to work with Asset Catalog but I couldn't get it to work with the iPad Pro icon.

5
votes

Go to xcode > select Images.xcassets > check ipad from the right menu at the top right > you will get new set of dimensions, now it's easy as fill your new app icons for each dimension. enter image description here

enter image description here

enter image description here

4
votes

For the forum post Andres mentioned in the comments:

Rename the 167x167 icon file to [email protected], place it in the Resources folder, and make sure it has a build action of BundleResource.

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

0
votes

I use Visual Studio 2017 on a Windows machine with a MacBook connected to it. I have an Asset Catalog called images that contains an image set called AppIcons where I have posted all of the various required image sizes. I was getting the same error as medvedo except I was getting three errors for 3 different images sizes (2 for ipad and 1 for ipod as I recall) After a lot of searching I found the solution was to reference the Asset Catalog in the Info.plist file.

First I had to find the path that Xamarin was putting my asset catalog in. I did that by deploying the app to the MacBook and then using Finder I went to the Go menu and chose the Library folder (earlier in the day I Googled how to show hidden folders on the Mac) In the Library folder I found the Caches folder and in that I found Xamarin/mtbs/builds/myappname There I found that the folder was Images.xcassets/AppIcons.appiconset. I say all of this knowing that it might always be in that folder but I had to look it up so I thought I would share in case it changes from installation to installation.

Once I knew the path and name I was able to add the following to my Info.plist file inside of branch

XSAppIconAssets Images.xcassets/AppIcons.appiconset

FYI - I have built and deployed this app to iTunes at least 4 times over the previous 8 months. I am not sure what I did, if anything, to cause the error to pop up.

0
votes

After trying many things, this is how I fixed the "Missing required icon" error messages: Go to Solution->ProjectName.iOS->Asset Catalogs->Assets.

See "AppIcons" there? We are going to delete it, BUT FIRST! Find that same folder in your project files and copy it somewhere safe. Now, delete the AppIcons asset in the project. Also delete the "Assets" catalog.

ProjectName.iOS right click select 'Clean'. Go to physical project folder. Delete the "bin" and "obj" folders. Find the empty "Assets.xcassets" folder and delete it as well.

ProjectName.iOS->Asset Catalogs right click select "Add Asset Catalog". It should automatically add an "AppIcons" entry. Go through and set each of the image sizes, pointing to where you copied your images. They will automatically be copied to the Assets.xcassets folder. They will also generate hidden entries in the ProjectName.iOS.csproj file that will include the image in the final binary. The entries look like this:

<ImageAsset Include="Assets.xcassets\AppIcons.appiconset\1024.png">
<Visible>false</Visible>
</ImageAsset>

Edit Info.plist. Set the App Icons Source to "AppIcons".

ProjectName.iOS right click, select "Rebuild". ProjectName.iOS right click, select "Archive". Archive Manager > Distribute > App Store. Verify certificate. Enter Apple login name and App-Specific password to upload. Done!