title: Access Resources in pod
body: <p>I would like to include image assets in a cocoapod library, but I'm having trouble accessing them. I've read these resources for help:</p>
  
  <p><a href="http://guides.cocoapods.org/syntax/podspec.html#resources" rel="nofollow noreferrer">Cocoapods Resources</a></p>
  
  <p><a href="http://guides.cocoapods.org/syntax/podspec.html#resource_bundles" rel="nofollow noreferrer">Cocoapods Resource Bundles</a></p>
  
  <p><a href="http://www.mokacoding.com/2014/02/13/sharing-assets-with-cocoapods-resource-bundle-and-dynamically-loaded-fonts.html" rel="nofollow noreferrer">Mokacoding Resource Bundles</a></p>
  
  <p><a href="https://stackoverflow.com/questions/23835052/load-image-from-cocoapods-resource-bundle">David Potter Resource Bundles</a></p>
  
  <p>However, none point me in the direction of accessing the resources. I've tried the following:</p>
  
  <pre><code>[UIImage imageWithData:[NSData dataWithContentsOfURL:[(NSBundle *)[NSBundle bundleWithIdentifier:@"Assets"] URLForResource:@"my-image@2x" withExtension:@"png"]]]
  [UIImage imageWithData:[NSData dataWithContentsOfURL:[(NSBundle *)[NSBundle bundleWithIdentifier:@"Assets"] URLForResource:@"my-image" withExtension:@"png"]]]
  [UIImage imageWithData:[NSData dataWithContentsOfURL:[(NSBundle *)[NSBundle bundleWithIdentifier:@"Assets.bundle"] URLForResource:@"my-image" withExtension:@"png"]]]
  [UIImage imageWithData:[NSData dataWithContentsOfURL:[(NSBundle *)[NSBundle mainBundle] URLForResource:@"my-image" withExtension:@"png"]]]
  [[UIImage imageWithData:[NSData dataWithContentsOfURL:[(NSBundle *)[NSBundle mainBundle] URLForResource:@"my-image@2x" withExtension:@"png"]]]
  [UIImage imageNamed:@"my-asset"]
  [UIImage imageNamed:@"my-asset@2x.png"]
  </code></pre>
  
  <p>But none of them work.</p>
  
  <p>I've setup my podspec with these alternatives and neither work with the above:</p>
  
  <pre><code>s.resources = ['Pod/Assets/*.{png, jpg}', 'Pod/Assets/**/*.{png, jpg}']
  s.resource_bundles = {
      'Assets' =&gt; ['Pod/Assets/*.{png, jpg}', 'Pod/Assets/**/*.{png, jpg}']
  }
  </code></pre>
  
  <p>The resources show up under 'Development Pods/My App/Resources' after a <code>pod update</code>, but I cannot access them for the life of me. There aren't any bundles and there isn't anything named 'Assets'.</p>
  
  <p>Any help or guidance would be appreciated.</p>