This question has been asked before and i have looked in all of the other stackoverflow topics for an answer, but i can't resolve the issue.
My app works fine in the simulator for all platforms, but when i run the app on my device i get the error code: Could not load the "image.png" image referenced from a nib in the bundle with identifier "com.bundle.identifier".
All of my pictures are .PNG files and i have used the storeboard to insert them in an imageView.
Program: Xcode 5
If you are using the image name without extension e.g. [UIImage imageNamed:@"myImage"];
then make sure that your image is of .png format, because Xcode will load only .png images without adding extension, otherwise you should use the name with extension [UIImage imageNamed:@"myImage.jpg"];
and should work.
I had the same issue and I resolved it by selecting the check box to add it to app in Target Membership. So, select the image from the library, and then on the File Inspector, add it to the target. It worked for me, hope it works for you as well.
Delete that image from the project and move it to trash and then try re-adding that image to the project by checking copy items to destination's group folder check box clicked.
This may be the reason for the issue for not loading the image in the device.
I resolved this issue by deleting the image named image.png
in my storyboard and it worked immediately. This image may also exists in your code or anywhere else.
The nib (or ultimately the xib) that is the cause of the warning message is the one that is loaded when the message gets written. You then can look at the controls that use images in the inspector and find one where the image name is "Unknown image" (or perhaps "image.png" in your case). You can then clear this value by setting it to some value and then clearing out the value. Note that with UIButton you'll need to try the four different values of "State Config" (Default, Highlighted, Selected & Disabled) to see where the invalid reference might be hiding.
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