Aditya Dey
Aditya Dey

Reputation: 53

Could not load the image referenced from a nib in the bundle with identifier

Copy items if needed -> Done Case sensitiveness -> Taken care Image is inside the project folder.

What can be the problem here?

Xcode version 9.0

Upvotes: 3

Views: 5009

Answers (3)

Moxarth
Moxarth

Reputation: 303

I had the same error , Click on a picture file in Xcode. in attribute, on bottom you'll see Target membership. Check the box and it is gonna work. it worked for me . try it once .

Upvotes: 0

Sai Sandeep
Sai Sandeep

Reputation: 149

Select image in Xcode, then on right side go to File Inspector check the target as follow image:

https://4.bp.blogspot.com/-_Ixa-3TkOR0/Wcn02iGYxJI/AAAAAAAADZE/DaOs9eutj4IH_lOl7DxMtF14btsw8oCpQCEwYBhgL/s1600/Screen%2BShot%2B2017-09-26%2Bat%2B11.55.37%2BAM.png

Upvotes: 0

rads
rads

Reputation: 281

I solved it by importing the image into assets (Assets.xcassets) and referencing it from there.

Looks like the build process in Xcode 9 no longer copies the images outside of xcassets into the bundle by default, so simply drag & drop doesn't work

As an alternative, although more cumbersome in my opinion, you could add them manually in the project Build Phases > Copy Bundle Resources

Upvotes: 3

Related Questions