Could not load the "" image referenced from a nib

I have no images called "" (nothing). I've gone through the .xib file of the screen where this pops up and can't find anything that would cause this. Anybody who have had the same issue? Here is the full warning:

Could not load the "" image referenced from a nib in the bundle with identifier "com.blah.Blah"


Solution 1:

You can do this to check it from your storyboard, or nib. Open it as Source Code:

enter image description here

Then "Find" the image name in it, see if it exists but already invalid in your project, probably you have deleted or changed its name, and now it doesn't seem valid.

enter image description here

Solution 2:

I had the same issue and in my case there was an UIButton with an invalid image reference in the storyboard file. The reference wasn't empty so it was not trivial to spot by just searching for "" in the storyboard file. However, Xcode did show "Unknown image" for the button in the Background field instead of "Default Background Image". In the storyboard file it appeared as

<state key="normal" title="Use" backgroundImage="0E39AEA8-7F29-40B2-96B1-63B99047E8D5">

so perhaps grepping for backgroundImage and looking for non-familiar references will help find the cause.

Solution 3:

I had this warning because of a UITabBarItem. In the attributes inspector for the field "Selected Image" I had a file listed that was also the value for the field "Image". Nevertheless, I received warnings until I made the "Selected Image" field blank.

Solution 4:

Just for reference, this problem is also caused by using .jpg images and referencing them inside of storyboards/nibs. iOS 8 appears to be able to handle the proper type checking between jpg and png images at runtime. However, on iOS 7 and below you will need to manually set the image in the code and remove the image reference inside of the storyboard to get rid of the warning.

Remember you need to manually set the .jpg when referencing jpg images.

[self.imageView setImage:[UIImage imageNamed:@"yourImage.jpg"]];