xcassets "Distill failed for unknown reasons" in Xcode 8, works fine in Xcode 7

Just opened a known working project in Xcode 8 and tried to run but the "Compiling asset catalogs" phase fails with the error "Distill failed for unknown reasons."


Is there a way to get better logging for this so I can fix it? As the title says, this project worked fine in Xcode 7.

Replies

I meet the same issue when I compile my project using XCode 8 Beta. Do you fix that?

I also have this exact problem, builds fine in Xcode 7, but fails with error `distill failed for unknown reasons` in Xcode 8.


Stackoverflow suggests that this issue can occur if an asset is accidentally included in the .xcassets bundle as a .psd (Photoshop file) instead of being rendered down to a .png, however this does seem to apply in this case.

Also having same issue.

Same issue here. Works fine in Xcode 7.

I figured out the problem: Missing @2x assets throws an error in Xcode 8. Check your Console output and you'll see errors like this: http://d.pr/AvUz showing which assets are failing to compile.

I've solved the issue: I had a space in the path to my XCode beta, and removing the space solved it. It's apparently a known issue. Leaving the rest of the post up in case anyone else runs into the same issue.


I've been having the same issue, but adding the @2x assets doesn't seem to help. I get a lot of output like this in the error:

Jul 14 20:17:03  IBCocoaTouchImageCatalogTool[67175] <Error>: CGColorSpaceCreateWithName failed for kCGColorSpaceSRGB
Jul 14 20:17:03  IBCocoaTouchImageCatalogTool[67175] <Error>: CGColorSpaceCreateWithName failed for kCGColorSpaceDisplayP3
Jul 14 20:17:03  IBCocoaTouchImageCatalogTool[67175] <Error>: CGColorSpaceCreateWithName failed for kCGColorSpaceSRGB
Jul 14 20:17:03  IBCocoaTouchImageCatalogTool[67175] <Error>: CGColorSpaceCreateWithName failed for kCGColorSpaceSRGB
Jul 14 20:17:03  IBCocoaTouchImageCatalogTool[67175] <Error>: CGColorSpaceCreateWithName failed for kCGColorSpaceSRGB
Jul 14 20:17:03  IBCocoaTouchImageCatalogTool[67175] <Error>: CGColorSpaceCreateWithName failed for kCGColorSpaceGenericGrayGamma2_2
Jul 14 20:17:03  IBCocoaTouchImageCatalogTool[67175] <Error>: CGColorSpaceCreateWithName failed for kCGColorSpaceSRGB
Jul 14 20:17:03  IBCocoaTouchImageCatalogTool[67175] <Error>: CGColorSpaceCreateWithName failed for kCGColorSpaceSRGB
Jul 14 20:17:03  IBCocoaTouchImageCatalogTool[67175] <Error>: CGColorSpaceCreateWithName failed for kCGColorSpaceSRGB


Repeated a lot until:


/ com.apple.actool.errors */
: error: Distill failed for unknown reasons.
/ com.apple.actool.compilation-results */
/Users/.../Provenance-beta/DerivedData/Provenance/Build/Products/Release-appletvos/Provenance.app/Assets.car
/Users/.../Provenance-beta/DerivedData/Provenance/Build/Intermediates/Provenance.build/Release-appletvos/ProvenanceTV.build/assetcatalog_generated_info.plist


Any ideas?

This works! Thank you so much for the updated answer! 🙂

How to do it?

If you hit this error, 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.) buildig 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.


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