title: How to access the bundle when using Swift Package Manager
body: <p>I have a framework that supports <code>CocaPods</code>. I have now added support for <em>Swift Package Manager</em> but experiencing a crash when trying to access the framework's bundle.</p>
  <pre class="lang-swift prettyprint-override"><code>    static func debuggerBundle(from target: AnyClass) -&gt; Bundle {
          let podBundle = Bundle(for:  target)
          guard let bundleURL = podBundle.url(forResource: &quot;Harlow&quot;, withExtension: &quot;bundle&quot;),
          let bundle = Bundle(url: bundleURL) else { fatalError(&quot;Must have a local bundle&quot;) }
          return bundle
      }
  </code></pre>
  <p>When installing with <code>CocoaPods</code>, the <code>.ipa</code> contains a <code>/Frameworks</code> folder with all the frameworks. But when running with <em>SPM</em>, the frameworks do not exist.</p>
  <p><em>Using CocoaPods</em></p>
  <p><a href="https://i.stack.imgur.com/XZRSO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XZRSO.png" alt="Using CocoaPods" /></a></p>
  <p><em>Using SPM</em></p>
  <p><a href="https://i.stack.imgur.com/UU1bv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UU1bv.png" alt="Using SPM" /></a></p>
  <p><strong>How do we access the framework's bundle with SPM?</strong></p>
  <p><a href="https://github.com/stanwood/Harlow/" rel="nofollow noreferrer">https://github.com/stanwood/Harlow/</a></p>