Asset Catalog not being used in project
Asked Answered
N

1

10

I have a project using an asset catalog and recently without any change on my part, the images are just not displaying. It displays this error:

2014-06-23 21:41:02.824 Project[8247:464100] CUICatalog: Can't find rendition for name: menu scale factor: 2 device idiom: 1 device subtype: 568
2014-06-23 21:41:02.825 Project[8247:464100] Could not load the "image" image referenced from a nib in the bundle with identifier "com.sieradzki.Project"

I know this has already been answered here: Asset Catalog Error: CUICatalog: Can't find rendition for name but the solution to that was with Cocoapods, but I don't use Cocoapods on my project at all and I don't even have it installed on my Mac.

Na answered 23/6, 2014 at 22:55 Comment(4)
See my answer here ... I wasn't using Cocoapods either.Fairground
Have you checked that in your nib file, the image of the UIImageView is not shown as unknown? The image would appear to render correctly inside Interface Builder.Brian
Is it possible that you have the asset in the catalog set to use device-specific assets but don't have a specific asset set for the 4-inch iPhone (which is what it appears the Retina + 568 would mean)?Indican
This could sound silly, but it actually happened me yesterday: have you checked if the target flag is checked for the asset catalog?Nod
C
0

I've had this happen to me in the past, and it's always been because I have the Image Set set to "Device Specific" instead of "Universal" when using an image for iPhone and iPad.

For example, if you're using "~iphone" in the name and dragging into the assets catalog, it'll automatically get set as "Device Specific" with "iPhone" selected. Then when you load on iPad it may grab that image still (since that's Xcode's best guess at what you want), but give a warning saying it couldn't find an iPad one. Switching the image set to universal fixes the issue.

I'm willing to bet you have the exact same issue, but you did it with "~ipad".

Cedell answered 22/12, 2014 at 16:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.