0

I'm trying to use an ImageAssets folder to a static library. I've read every post I could find about the process. I was following these steps from apple's guide

My steps were:

  1. Create a Resource folder in the project directory.
  2. Renamed it as a .bundle
  3. Added an ImageAssets folder into the bundle
  4. Add it to the project
  5. Add it the 'copy bundle resources' build phase

When I try to access an image inside: UIImage* img = [UIImage imageNamed:@"BackLight"];

it's not found.

  • I've also tried to add ImageAssets folder directly to the project and add it to the 'copy bundle resources' phase with same results.

Additional info:

  • Xcode 6.3.1
  • Obj-C
U_D
  • 711
  • 1
  • 10
  • 18
  • Can you also post the code on how you are trying to access the image? – Daniel Albertini Jul 21 '15 at 11:42
  • See your answer in below Link – Manoj Chandel Jul 21 '15 at 11:50
  • If you looked through a lot of similar questions you should have noticed the answers similar to the quote from the documentation that you linked: "Static libraries cannot include resources directly, but a static library project can provide resources which an application can reference and include in its Copy Bundle Resources phase". As for the image assets, I believe it should be added directly as opposed to be part of the resources bundle due to the need to preprocess the bundle - it isn't used simply as an images folder to be copied. – A-Live Jul 21 '15 at 11:52

0 Answers0