Xcode error : Distill failed for unknown reasons
Solution 1
You might have migrated from a normal project to use an image.catalog. So you can definitely try to copy the bundle resource like launch images. It is so because migrating to an asset catalog for icons and launch images apparently doesn't always add itself to the target automatically.
You can find more on this here & here.
I hope that helps.
Solution 2
I found that my png was a psd file. I deleted the file and recreated a new png and everything was fine.
grgr
Solution 3
I had the same case as Karsten, one of the image was psd. I opened the file in Mac Preview app and tried to export and found that it was a PSD instead of .png
Solution 4
For me, I used with Xcode beta but I didn't upgrade my MAC OSX beta to the latest version as Apple recommends.
Solution 5
In my case it was a PSD file saved as PNG. You can search for wrong files by running following command in Terminal in your assets directory:
grep -rL "PNG" --include \*.png .
Jun
Updated on July 09, 2022Comments
-
Jun almost 2 years
Does anybody know why this error happens on Xcode 5?
Answer
I had this problem when I accidentally renamed a .psd as a .png. Converting the image to an actual png instead of a Photoshop file fixed it for me.
-
Kevin R about 9 yearsTo clarify for future readers: second link points out that you might've saved the image as the wrong format (in my case: saving a PSD file with a .PNG extension).
-
Craig Grummitt over 8 yearsSame here, the extension was 'png' but I accidentally saved the file as psd type. Shame Xcode doesn't identify the specific file with the problem, takes some trial and error to narrow it down.
-
T Blank over 8 yearsImportant Note: Preview and Xcode will treat your fake PNG just like a normal PNG. One of my tvOS app icon layers happened to be a PSD masquerading as a PNG, and it was way harder to track down than I thought it would be. So when testing your PNG assets, you must attempt to open them in Photoshop, not just in Preview. Your app will build and UIImage will work with your PSD that's been named *.png JUST FINE. I really wish it wouldn't.
-
Luis Artola over 8 yearsSaved me a lot of head scratching. Thumbs up for second link too. Thanks!
-
DardanM about 8 years@Harry Not sure what your point is. It still helped other people (including me)
-
Martin over 7 yearsjust arrived on a project, migrated to xcode 8, got this error, and looked at the 100 x 3 assets present in the xcasset file... what a good day.
-
RyanJM over 5 yearsIn Terminal, you can do
file filename.png
to check the type. I also usedfile */*
in the root of the*.xcassets
directory to check all the files in the group. -
CrazyPro007 over 4 yearsI have all image in png... still I am facing error in Xcode11GM-seed1
-
CEH over 4 yearsIt would be helpful if you provided some more specific info on how you updated the latest xcode. between which two versions did you do the update?
-
IgorGanapolsky over 3 yearsWhat is image.catalog?
-
Odys over 3 yearsThanks for the response. On
10.15 beta 19A471t
with xcode11.3.1 11C505
the bug exists. Just adding one png icon to the assets it fails the build.