Xcode 9: issue of generating icns file

During developing of my new app IconBook, I find some apps’ icns files do not contains all format as I presume, even those apps update in recent days.

For example, Colorcast, MetaImage, Pixelmator Pro.

I contact their developers and they do not expect such issue and have no idea.

After some test, I find the reason behind it. Here are my steps:

  1. Create a new project in Xcode 8 and Xcode 9 respectively. Name the first one as project1, the second one project2.
  2. Drag 10 icon png files (resolutions are 16 x 16, 32 x 32, 128 x 128, 256 x 256, 512 x 512, and their @2x version) into Assets.xcassets->AppIcon. Arrange them by resolution properly.

    Xcode's app icon setting.
  3. Run the projects.

    project1.app’s bundle only contains an icns file, no Assets.car. And the icns file contains all 10 formats added in step 2.

    project2.app’s bundle contains an icns file and Assets.car. And the icns file contains only 4 formats added in step 2. They are 16 x 16, 32 x 32, 128 x 128, 256 x 256. The Assets.car contains all 10 formats above, and some other files named like “ZZPackedAsset-1.0.0-gamut”. (I’m using a tool named Asset Catalog Tinkerer to open .car files).

    AppIcon.icns in Preview.app
    Assets.car in Asset Catalog Inkerer.app
  4. Quit all Xcode. Use Xcode 9 to open project1, clean and run. Now the app bundle contains wrong icns file and Assets.car.

I can’t use Xcode 8 to open project2, an error shows “Failed to load project at ‘/xxx/yyy/zzz.xcodeproj’, incompatible project version.”.

Xcode 8 can not open Xcode 9 project.

It is clear that Xcode 9 has bug in processing app’s icon. It can not generate correct icns file and it includes icon’s raw png file into assets package, which is unnecessary.

But, even the bug exists, user can hardly notice it, because he can see the right result at any used places of the app icon, Finder(zoom in to view max-size icon), Launchpad, Activity Monitor.

PS, I use Xcode 8.3.3, Xcode 9.4.1. Then I test Xcode 10 beta 6, the bug still exists.

The test projects are here.

Updated: