Xcode error : Distill failed for unknown reasons

IosIphoneXcodeIos7Xcode5

Ios Problem Overview


Does anybody know why this error happens on Xcode 5?

error

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.

Ios Solutions


Solution 1 - Ios

I found that my png was a psd file. I deleted the file and recreated a new png and everything was fine.

grgr

Solution 2 - Ios

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 enter image description here

Solution 3 - Ios

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 4 - Ios

For me, I used with Xcode beta but I didn't upgrade my MAC OSX beta to the latest version as Apple recommends.

enter image description here.

Solution 5 - Ios

In my case, one of the image asset is corrupted and caused this issue.

Corrupted image usually with 0 (zero) size. so, we can use terminal to find out which one:

> find ./your_directory_path -size 0 -print

Solution 6 - Ios

For me the solution was to do the following (given I had no .psd as .png, etc.).

> Go to the General tab of the Target in Xcode project settings, > roll down to the "App Icons and Launch Images" section, and change > the value of "App Icons Source" from "AppIcon" to "Don't use > asset catalogs"

Note: this way the project builds and deploys on iOS, and later you can change the AppIcon settings back, adding your custom AppIcon (with proper file-format and file-extension).

Solution 7 - Ios

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 . 

Solution 8 - Ios

Xcode 11: I just removed Assets.xcassets and re-added to target, and it worked.

Solution 9 - Ios

Update or ensure minimum version is: Mac OS CATALINA BETA 10.15 beta (19A536g) and Xcode Version 11.0 beta 5 (11M382q)

After talking with an apple engineer, the problem was solved by updating MAC OS and Xcode, specifically to these versions I assure that the problem was solve.

Solution 10 - Ios

In my case I just forgot to initialize Git LFS for my repo.

Solution 11 - Ios

If you hit this error, as a workaround, try removing all the images in you Images.xcassets from their placeholders and build the project again. Assuming the project builds without any images in place, which was the case for me, start re-adding images back one by one, starting from the bottom (App Store, iPad etc.) building project after each addition. This will help you isolate placeholders that cause the error.

In my case: the set of icons that comes with cocos2d-x project, the problem doesn't seem to be with a particular image, but with placeholder it is placed in. In particular, it seems to give an error on all placeholders whose name includes "iPhone". I can successfully build the project with all non-iPhone placeholders filled, but as soon as I move an image from say iPad placeholder to a compatible iPhone placeholder (e.g. iPad Notifications 20pt@2x to iPhone Notification 20pt@2x) the project fails with the above mentioned error.

I'm on the latest (as of right now) MacOS Catalina 10.15 Beta (19A487l) and the latest Xcode 11.3.1 (11C504), but I still hit this error, so the suggestions about to update to the latest won't necessarily work. The command line in both cases is:

/Applications/Xcode.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info /Users/me/Library/Developer/Xcode/DerivedData/MyProject-eiofgcnvwliyntcmqdepcocwffyk/Build/Intermediates.noindex/MyProject.build/Debug-iphoneos/MyProject-mobile.build/assetcatalog_dependencies --output-partial-info-plist /Users/me/Library/Developer/Xcode/DerivedData/MyProject-eiofgcnvwliyntcmqdepcocwffyk/Build/Intermediates.noindex/MyProject.build/Debug-iphoneos/MyProject-mobile.build/assetcatalog_generated_info.plist --app-icon AppIcon --enable-on-demand-resources YES --filter-for-device-model iPhone10,6 --filter-for-device-os-version 13.3.1 --sticker-pack-identifier-prefix com.example.app.ios.sticker-pack. --development-region English --target-device iphone --target-device ipad --minimum-deployment-target 12.1 --platform iphoneos --product-type com.apple.product-type.application --compile /Users/me/Library/Developer/Xcode/DerivedData/MyProject-eiofgcnvwliyntcmqdepcocwffyk/Build/Products/Debug-iphoneos/MyProject-mobile.app /Users/me/Projects/Cocos/MyProject/proj.ios_mac/ios/Images.xcassets

Solution 12 - Ios

In my case, there is a invalid png image in Assets.xcassets.

Solution 13 - Ios

I had the same error and it is because I forgot initializing Git LFS. So the png files are not pulled

Solution 14 - Ios

I was prompted this error and I inspect error logs.

PrefixIcons.xcassets/PrefixButtonBackground.imageset/PrefixButtonBackground.png
/* com.apple.actool.errors */
: error: Distill failed for unknown reasons.

The reason was.

I have mistakenly added same image for 1x and 2x sizes for above given image.

Might be helpful to someone.

Solution 15 - Ios

it happen for me with xcode 7.3 when i was replace an insert and image with the same name in the folder (in finder screen)

so i just rename remove the image form assets and insert it gain with a different name clean + build and it works fine

Solution 16 - Ios

My image names that contained "ç" or that end with "é" caused the problem. Renaiming it and cleaning the project did the trick! Odly this naming worked on xcode 10 but no more on 11.1

Solution 17 - Ios

I faced this error on Xcode_11.1 and completely wasted my whole week. then I realize it was Xcode itself bug, I tried many of the above answers but no luck.

to make sure it's Xcode bug just simply empty the asset folder the try to build with empty folder if errors still exist then downgrade or upgrade to another version my working version was Xcode_10.2.1

Hope it helps

Solution 18 - Ios

After investing like 6-7 hours on this,I checked same project on MacOS Mojave - 10.14.6(18G103)and it was working fine but it was not working on MacOS Catalina Beta Version. After investigating, i updated the MacOS to the latest Catalina Beta Version and it was working fine.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJunView Question on Stackoverflow
Solution 1 - IosKarstenView Answer on Stackoverflow
Solution 2 - Iosnaveed148View Answer on Stackoverflow
Solution 3 - IosBalram TiwariView Answer on Stackoverflow
Solution 4 - IosevyaView Answer on Stackoverflow
Solution 5 - IosJoniView Answer on Stackoverflow
Solution 6 - IosDániel László KovácsView Answer on Stackoverflow
Solution 7 - IoskrzysztofView Answer on Stackoverflow
Solution 8 - IosMohammad Zaid PathanView Answer on Stackoverflow
Solution 9 - IosGusView Answer on Stackoverflow
Solution 10 - IosTimofey KuzminView Answer on Stackoverflow
Solution 11 - IossolodonView Answer on Stackoverflow
Solution 12 - IosnathanwhyView Answer on Stackoverflow
Solution 13 - IosMortyXiongView Answer on Stackoverflow
Solution 14 - IosMadNikView Answer on Stackoverflow
Solution 15 - IosAmr AngryView Answer on Stackoverflow
Solution 16 - IosglemoulantView Answer on Stackoverflow
Solution 17 - IosPayam KhaninejadView Answer on Stackoverflow
Solution 18 - IosSonali RanaView Answer on Stackoverflow