Ios – Could not load the image referenced from a nib in the bundle with identifier (again)

bundleimageiosipadxcode

(Xcode 6.0.1, iOS 7.1.1, iPad2)

  • Added three new images to Images.xcassets
  • Checked "Copy items if needed" on import dialog
  • Build phases -> Copy Bundle Resources: Deleted and re-added Images.xcassets
  • Checked image names to avoid case sensitivity issues
  • Cleaned and rebuilt.
  • Quit Xcode and restarted
  • Deleted app from device for clean install

Trying to set the image as a button background.

Images are showing in the simulator, but not on a device. This leads me to believe that they're not being bundled with the app, despite the fact that I've included images.xcassets in the build.

I would like to check and see if the three new image sets are included, but there does not seem to be a way to drill down into images.xcassets within the "Copy Bundle Resources" branch under "Build Settings."

I am setting the image background in storyboard by clicking on the image view, selecting the "Attributes Inspector" button, and then selecting the image name in the drop-down under "Background."

Other images work; it's just the newly added images that don't show up.

I'm stumped… any advice?

Best Answer

In my case the problem was that I used some .JPG images (which I know is not the ideal format but I wasn't worried with that yet since I was only doing some initial development).

I converted one of the images to .PNG (using Preview), imported and the problem was resolved!