29

Running Xcode 10 and can not seem to find much information on this error that occurs when building my project.

Any ideas on how to fix this?

Here is the last line before the error:

Desktop/CheerApp!/CheerApp!/Assets.xcassets Command CompileAssetCatalog failed with a nonzero exit code –

Expanded:

CompileAssetCatalog /Users/michaelansell/Library/Developer/Xcode/DerivedData/CheerApp!-ehbjnqaldsycfegiviymewkplqhm/Build/Products/Debug-iphonesimulator/CheerApp!.app /Users/michaelansell/Desktop/CheerApp!/CheerApp!/Assets.xcassets (in target: CheerApp!) cd /Users/michaelansell/Desktop/CheerApp! /Applications/Xcode.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info /Users/michaelansell/Library/Developer/Xcode/DerivedData/CheerApp!-ehbjnqaldsycfegiviymewkplqhm/Build/Intermediates.noindex/CheerApp!.build/Debug-iphonesimulator/CheerApp!.build/assetcatalog_dependencies --output-partial-info-plist /Users/michaelansell/Library/Developer/Xcode/DerivedData/CheerApp!-ehbjnqaldsycfegiviymewkplqhm/Build/Intermediates.noindex/CheerApp!.build/Debug-iphonesimulator/CheerApp!.build/assetcatalog_generated_info.plist --app-icon AppIcon --compress-pngs --enable-on-demand-resources YES --optimization space --filter-for-device-model iPhone11,2 --filter-for-device-os-version 12.0 --sticker-pack-identifier-prefix Mike.CheerApp-.sticker-pack. --target-device iphone --target-device ipad --minimum-deployment-target 11.4 --platform iphonesimulator --product-type com.apple.product-type.application --compile /Users/michaelansell/Library/Developer/Xcode/DerivedData/CheerApp!-ehbjnqaldsycfegiviymewkplqhm/Build/Products/Debug-iphonesimulator/

PinkeshGjr
  • 7,978
  • 5
  • 37
  • 54
Michael Ansell
  • 299
  • 1
  • 3
  • 6
  • You probably need to get more information about why it failed. This question suggests a way to get more information about the failed build process: https://stackoverflow.com/questions/30060898/xcode-how-to-see-build-command-and-log – GregHNZ Sep 25 '18 at 02:28
  • adding some more info can help. – kj007 Sep 25 '18 at 02:29
  • I added some info if you would like to take a look – Michael Ansell Oct 05 '18 at 01:20

26 Answers26

28

I managed to resolve this by doing a "build clean", removing "DerivedData" folder and re-starting my Mac.

PinkeshGjr
  • 7,978
  • 5
  • 37
  • 54
Jmf
  • 337
  • 2
  • 7
12

It seems that this occurs if you change one of the images opened from the Assets. Here are some solutions that worked:

  1. Run the app on a different simulator
  2. Clean (both CMD+SHIFT+K and CMD+ALT+SHIFT+K)
  3. Re-add the Assets into the project
  4. Restart Mac
  5. JOKE: Restart the electric power plant
User123335511231
  • 11,344
  • 4
  • 17
  • 20
7

Try removing and then re-adding some of the files you're using. That did it for me at least.

This seems to be a bug in the Xcode 10.1

Linus
  • 318
  • 4
  • 11
6

Make sure that you have an AppIcon file in your assets. I had the same error because I did deleted that file.

enter image description here

3

I found the same error related to the Launch Images.

My solution:

In the main project settings go to:

  1. Tab: General
  2. Section: App Icons and Launch Images
  3. Option: Launch Images Source

Remove the link to the asset catalog, and clean the build folder with CMD+SHIFT+K.

Voilà!

You can link it later again.

L33MUR
  • 3,917
  • 2
  • 13
  • 24
  • In my case it's a sticker pack. I followed this to change the App Icons Source in 2 places to not use asset catalog. This cleared it up. Thanks for the tip! – Dan Feb 06 '22 at 17:13
3

I was downgrading Xcode from 12 to 10.1 to work on an old project. I had done this before successfully but after upgrading from Catalina to Big Sur it stopped working. I was getting errors about Storyboards and the Asset folder:

Command CompileAssetCatalog failed with a nonzero exit code Command

CompileStoryboard failed with a nonzero exit code

I tried everything above and beyond. And only managed to get it working by deleting this library (right click Xcode 10.1 app icon > "Show Package Content"):

Xcode.app/Contents/Developer/usr/lib/libMainThreadChecker.dylib

Juan Fran Jimenez
  • 1,521
  • 14
  • 19
2

In Xcode 10 Go to Product>Clean Build Folder

or

User Short cut as Shift+Command+K

After that make run it will work, it worked in my case.

Ananta Prasad
  • 3,417
  • 2
  • 20
  • 35
2

In my case, the .xcassets file's target membership was unchecked for some reason. All I had to do was re enable it for the target I was working on and it fixed the error.

2

All of answers don't work for me. What solved and found by me is getting better Xcode like Xcode11 beta5 or Xcode10.3 stable and installing it and then Shift-Command-K to clean the project.

And recompiling the project with new Xcode version solved the problem.

Sungwook Kim
  • 198
  • 1
  • 2
  • 9
1

I also had the same issue on Xcode 10. Tried everything but nothing worked. Just out of curiosity tried compiling my project in Xcode 9.4 and it failed again but this time it gave me a valid error. In my case it was because of no images in the launch image assets and the project being an old one had launch images instead of launch screen storyboard. Would recommend to try the project in lower Xcodes of available.

PinkeshGjr
  • 7,978
  • 5
  • 37
  • 54
Prasad Parab
  • 331
  • 1
  • 12
1

Try to restart your Xcode, and Mac. Then, clean build the project itself(command+shift+B). Worked for me. Sometimes, Xcode acts weirdly, and just needs to be restarted. Good luck!

1

in Build settings, enable "Embed Asset Packs in Product Bundle". screenshot

Dharman
  • 26,923
  • 21
  • 73
  • 125
0

Ensure that the command-line tools and all required components are installed for your version of Xcode as the asset compilation does use some of these tools, and may be using outdated ones depending on your setup.

I was hitting a CompileAssetCatalog error on our remote build machine after the Xcode 10.1 upgrade - but it worked on a separate machine locally. I hadn't run xcode on the remote machine so it had not prompted to install all the latest components, running xcode and installing the missing components resolved the issue for us.

Danny Parker
  • 1,613
  • 18
  • 28
0

Did you copy an assets folder into your Xcode project? If so you might have 2 and need to erase the old one.

0

I also faced same issue and I follow these steps :

1- Remove Reference Assets.xcassets folder.

2- Clean (both CMD+SHIFT+K and CMD+ALT+SHIFT+K).

3- Build (CMD+B).

4- Add your Assets.xcassets folder.

5- Follow steps 2 & 3 again.

Abhishek Mishra
  • 1,597
  • 15
  • 32
0

If you are experiencing this issue on Xcode 10.3, Delete the folders iOS DeviceSupport, DerivedData and Archives from library/Developer/Xcode folder and restart your mac.

Pedro Paulo Amorim
  • 1,646
  • 2
  • 24
  • 45
0

Go to the Assets.xcassets in the xcode and resolve the error and warnings in it. In this CheerApp asset is not properly linked got to that asset in xcode and drag and drop in respective 1x,2x

BASIL BABY
  • 73
  • 2
0

I encountered this on Xcode 11 and nothing worked until I deleted and re-installed Xcode.

dustinrwh
  • 850
  • 1
  • 13
  • 16
0

This should be a temporary workaround, if you are in urgent, but build succeeded by changing simulator.

Sushilinux
  • 650
  • 7
  • 21
0

What worked for me was adding an AppIcon in the Assets. I had previously deleted the one that came with the project, but re-adding it solved the issue for me

0

In my Assets folder, I have some images, one of which was corrupted. Having a corrupted file loaded in the Assets folder will also cause this error!

enter image description here

Kay
  • 199
  • 2
  • 9
0

This error can appear when asset catalog take long time to compile. It is one more case I faced and rebuilding the project again fixed the issue in most cases.

igitgor
  • 66
  • 4
0

My solution was to delete the images that were not used in Assets.xcassets.

Working for me.

water_ak47
  • 886
  • 10
  • 8
0

My solution, after trying a lot of suggested fixes from above on XCode 10.1, was to run the project on XCode 10.0. Magically, it just worked.

dorsz
  • 795
  • 8
  • 17
0

If you didn't provide an AppIcon it will produce the same error.

/* com.apple.actool.errors / : error: None of the input catalogs contained a matching stickers icon set or app icon set named "AppIcon". / com.apple.actool.compilation-results */

  • Remember to review the existing answers before contributing a new answer. In this case, this was already suggested with additional details in [an answer by @Vladimir Kuzomenskyi](https://stackoverflow.com/a/59002110/3025856) two years ago. – Jeremy Caney Nov 07 '21 at 21:14
0

If you are having this problem on a react-native project, with Xcode version 13: you need to add your app icon to the Assets folder, instead of the Images folder.

vanenshi
  • 43
  • 4
  • 9