Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't add image in Asset catalog after updating to Xcode 11 GM Seed

Tags:

xcode

ios

Recently I updated my xcode 11 beta version to Xcode 11 GM Seed and now, My Asset catalog kind of doesn't work. I'm getting errors on any photos I had in my asset,

2019-09-11 14:15:16.159 ibtoold[3321:122488] DEBUG: Added to environment: {
    TMPDIR = "/var/folders/js/9yy54t2145v7z3c8c240cbl00000gn/T/C2ABF262-A505-4044-A56B-899235F2E016";
}
2019-09-11 14:15:16.493 IBCocoaTouchImageCatalogTool[3325:122673] Unable to get image dimensions for file:///Users/sinamnouri/OneDrive/Documents/iOS/ProTech-iOS/ProTech-iOS/Assets.xcassets/Screen%20Shot%202019-08-02%20at%2015.41.29.imageset/Screen%20Shot%202019-08-02%20at%2015.41.29.png
2019-09-11 14:15:16.509 IBCocoaTouchImageCatalogTool[3325:122673] CoreThemeDefinition: Unable to create image for file:///Users/sinamnouri/OneDrive/Documents/iOS/ProTech-iOS/ProTech-iOS/Assets.xcassets/Screen%20Shot%202019-08-02%20at%2015.41.29.imageset/Screen%20Shot%202019-08-02%20at%2015.41.29.png
2019-09-11 14:15:16.517 IBCocoaTouchImageCatalogTool[3325:122673] CoreThemeDefinition: Unable to create image for file:///Users/sinamnouri/OneDrive/Documents/iOS/ProTech-iOS/ProTech-iOS/Assets.xcassets/Screen%20Shot%202019-08-02%20at%2015.41.29.imageset/Screen%20Shot%202019-08-02%20at%2015.41.29.png
2019-09-11 14:15:16.535 IBCocoaTouchImageCatalogTool[3325:122676] CoreThemeDefinition: Unable to create image for file:///Users/sinamnouri/OneDrive/Documents/iOS/ProTech-iOS/ProTech-iOS/Assets.xcassets/Screen%20Shot%202019-08-02%20at%2015.41.29.imageset/Screen%20Shot%202019-08-02%20at%2015.41.29.png
/* com.apple.actool.errors */
: error: Distill failed for unknown reasons.
/* com.apple.actool.compilation-results */
/Users/sinamnouri/Library/Developer/Xcode/DerivedData/ProTech-iOS-btktchaxrlqoowffdmaxojqvzury/Build/Products/Debug-iphonesimulator/ProTech-iOS.app/Assets.car
/Users/sinamnouri/Library/Developer/Xcode/DerivedData/ProTech-iOS-btktchaxrlqoowffdmaxojqvzury/Build/Intermediates.noindex/ProTech-iOS.build/Debug-iphonesimulator/ProTech-iOS.build/assetcatalog_generated_info.plist

Right now, I only have one single image in my asset and I get this error when I build the project.

like image 393
SinaMN75 Avatar asked Sep 11 '19 09:09

SinaMN75


People also ask

How do I add an asset catalog in Xcode?

If you don't already have an asset catalog in your project, you can create one by right-click on your project and choosing New File. From "iOS" choose "Resource" then Asset Catalog, then click Next and name your catalog. You can now select your new asset catalog in Xcode, and drag pictures directly into it.

How do I import an image into Xcode?

Drag and drop image onto Xcode's assets catalog. Or, click on a plus button at the very bottom of the Assets navigator view and then select “New Image Set”. After that, drag and drop an image into the newly create Image Set, placing it at appropriate 1x, 2x or 3x slot.

What is images Xcassets?

The images. xcassets catalog is the default asset, used to manage the required app icons and launch images.

What is assets Xcassets?

xcassets Catalog in Xcode. An asset catalog, simply put, is a single folder in Xcode that you use to organize your app's images, icons, colors, and more. Instead of adding individual images to Xcode's file organizer, you add assets neatly organized in a single catalog.


1 Answers

Had similar problems after updating to Xcode 11 GM.

I fixed my problem by doing the following:

  1. Go to Build Phases
  2. Expand [CP] Copy Pods Resources
  3. Look for "Output files" and remove "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Assets.car"

The project should now build. This entry will be re-added every time that you do a pod update.

like image 133
José Avatar answered Sep 28 '22 06:09

José