Xcode error message conflicts with documentation

Trying to validate macOS app but get error message that the bundle does not contain two ICNS icons. The link to the relevant documentation clearly states that ICNS icons must not be used!

The forum will not allow me to add screenshots of post links to a hosted copy (not very helpful!). I can only link to Apple URLs...

The error message says: "Missing required icon. The application bundle does not contain an icon in ICNS format, containing both a 512x512 and a 512x512@2x image. For further assistance..."

Documentation I refer to is here

To make my life even more difficult the bundle DOES contain the two ICNS icons!

Help in getting past this stuff will be appreciated.


Replies

What do you have in Assets.xcassets>AppIcon ?

You should have 5 couples of icons (1x and 2x), for
  • Mac 16pt

  • Mac 32pt

  • Mac 128pt

  • Mac 256pt

  • Mac 512pt : 1x and AppStore - 2x


Each being png file of the correct size.
In attribute inspector of each icon:
App Icon section
  Mac selected
  Gamut : Any
Yes, have all those icons...
Thanks to Google (no thanks to Apple documentation) I found a solution.
I needed to create an icon set and then add it to my project. But, using the add files option in Xcode is not sufficient; I had to manually add the name of my icons (without the .iconset suffix) to the icon file entry in my info-plist.

Apple documentation is wrong on two counts: says icns files should not be used (but it won't work without them) and, elsewhere, says just add the .png icon files and Xcode will take care of everything (which it does not).

Several hours wasted thanks to poor documentation!
Yes documentation is poor (not only here).
You could file a bug report against documentation.

The way I proceed usually is to create icons at the exact size outside of Xcode.
Then drag and drop in right location.

I never had problem this way, except… with detritus.

If you modify the external file (like adding some information), then Xcode will get an error complaining that some file present detritus in Finder…
You then have to clean the files removing the attributes in terminal with xattr command.

Hope you won't have such a problem.