There is an image file named "5.jpg", in the Assets.xcassets named "5".
I wrote code UIImage *image = [UIImage imageNamed:@"5"]; to create the image but app crashes and outputs *** Assertion failure in -[_CUIThemePixelRendition _initWithCSIHeader:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreUI/CoreUI-432.4/CoreTheme/ThemeStorage/CUIThemeRendition.m:3797 in the console.
I had this problem in the XCode 9 beta, running iOS 10 or below. It seems that Apple has dropped support for JPEG files in XCAssets. You can either use do as @Esha suggested and switch to PNG's or you can not use an XCAsset, put the image in your local directory, and refer to it by its URL.
It's possible that Apple did this intentionally (though if they did, I couldn't find any documentation for it) or that this is an XCode 9 bug. I have reported to apple and you can track the progress of the bug here.
Try puting .png images in the asset folder. jpg images will make this issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With