title: How to embedded Images and use those Images when creating custom cocoapod in iOS, swift 4
body: <p><strong>WHAT I DID.</strong> </p>
  
  <p>I'm creating my own cocoapod Library. inside my library there are two directories <strong><code>Classes</code></strong> and <strong><code>Assets</code></strong>. I put all my <strong><code>.swift</code></strong> files into <strong><code>Classess</code></strong> directory and I can access those classes properly. Then I tried to add images by adding images into <strong><code>Assets</code></strong> directory. Then it creates a another <strong><code>Resources</code></strong> folder for me and inside that folder I can see all my <strong><code>.png</code></strong> files. </p>
  
  <p><strong>WHAT I EXPECTED</strong></p>
  
  <p>now I'm trying to access those images from my <strong><code>.swift</code></strong> files. as an example thinks that I have <strong><code>myviewcontroller.swif</code></strong> file which has <strong><code>UIImageView</code></strong> inside it. then I tried :</p>
  
  <pre><code>myimageView.Image = UIImage(named:"myimage.png")
  </code></pre>
  
  <p>This gives me a nil value.</p>
  
  <p><strong>MORE DETAILS :</strong> </p>
  
  <p>here is my <strong><code>podspec</code></strong> file.</p>
  
  <pre><code>Pod::Spec.new do |s|
      s.name             = 'bottlenecLibrary'
      s.version          = '0.1.6'
      s.summary          = 'palm ios sdk for developers'
      s.swift_version    = '4.0'
  
  # This description is used to generate tags and improve search results.
  #   * Think: What does it do? Why did you write it? What is the focus?
  #   * Try to keep it short, snappy and to the point.
  #   * Write the description between the DESC delimiters below.
  #   * Finally, don't worry about the indent, CocoaPods strips it!
  
  s.description      = &lt;&lt;-DESC
  This libraray includes all necessary resources for developers
  DESC
  
  s.homepage         = 'https://bitbucket.org/palm/palmiossdk'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  s.license          = { :type =&gt; 'MIT', :file =&gt; 'LICENSE' }
  s.author           = { 'palm group' =&gt; 'pods@palm.com' }
  s.source           = { :git =&gt; 'https://palmss@bitbucket.org/palm/palmiossdk.git', :tag =&gt; s.version.to_s }
  # s.social_media_url = 'https://twitter.com/&lt;TWITTER_USERNAME&gt;'
  
  s.ios.deployment_target = '9.0'
  
  s.source_files = 'bottlenecLibrary/Classes/**/*'
  
  s.resource_bundles = {
      'bottlenecLibrary' =&gt; ['bottlenecLibrary/Assets/*.png', 'bottlenecLibrary/Assets/*.xcassets', 'bottlenecLibrary/Resources/*.png']
  }
  # s.public_header_files = 'Pod/Classes/**/*.h'
  # s.frameworks = 'UIKit', 'MapKit'
   s.dependency 'Alamofire', '~&gt; 4.7'
  
  end
  </code></pre>
  
  <p>I tried with adding all these : <code>['bottlenecLibrary/Assets/*.png', 'bottlenecLibrary/Assets/*.xcassets', 'bottlenecLibrary/Resources/*.png']</code> but nothing worked.</p>
  
  <p>Note : I tried to read the image using  bundle also.</p>
  
  <p>Hope your help with this.</p>