fatal error: Could not create a path to the bundle
<p>I've been trying to make a CocoaPod that includes a <code>.xib</code> for two full days, to no avail. I have a standalone Xcode project for my framework with the following <code>.podspec</code>:</p>

<pre><code>Pod::Spec.new do |s|
  s.name         = "OrderStatusTable"
  s.version      = "1.2.0"
  s.platform = :ios
  s.ios.deployment_target = '9.0'
  s.summary      = "Order Status UITableView framework."
  s.description  = "A UITableView framework with custom view."
  s.homepage     = "https://github.com/myname/OrderStatusTableView"
  s.license = { :type =&gt; "MIT", :file =&gt; "LICENSE" }
  s.author = { "My Name" =&gt; "My Email" }
  s.platform     = :ios, "9.0"
  s.source       = { :git =&gt; "https://github.com/myname/OrderStatusTableView.git", :tag =&gt; "1.2.0" }

  s.source_files = "OrderStatusTable/**/*.{h,m,swift}"

  s.resource_bundles = {
    'OrderStatusTable' =&gt; [
        'Pod/**/*.xib'
    ]
  }

end
</code></pre>

<p>In my sample project, I'm adding <code>pod 'OrderStatusTable', :git =&gt; 'https://github.com/myname/OrderStatusTableView.git', :tag =&gt; ‘1.2.0’</code> to my Podfile. My <code>.xib</code> file is included in a Resources folder within the pod in the example project, but I keep getting this error: <code>fatal error: Could not create a path to the bundle: file /Users/myname/Desktop/appname/OrderStatusTableDemo/Pods/OrderStatusTable/OrderStatusTable/OrderStatusTable.swift, line 40</code></p>

<p>It's a <code>UITableView</code> framework and I'm trying to register a custom <code>UITableViewCell</code> nib with a cell reuse identifier, like this:</p>

<pre><code>    public class OrderStatusTable: UITableView {

    public override func awakeFromNib() {

        delegate = self
        dataSource = self

        let podBundle = NSBundle(forClass: self.classForCoder)

        if let bundleURL = podBundle.URLForResource("OrderStatusTable", withExtension: "bundle") {

            if let bundle = NSBundle(URL: bundleURL) {

                let cellNib = UINib(nibName: "OrderStatusTableViewCell", bundle: bundle)

                registerNib(cellNib, forCellReuseIdentifier: "OrderStatusTableViewCell")

            } else {

                assertionFailure("Could not load the bundle")

            }

        } else {

            assertionFailure("Could not create a path to the bundle")
            // This keeps getting called
        }
}
</code></pre>

<p>So I'm not sure if I have the wrong bundle <code>URLForResource</code> or what? This isn't very well documented online. Can someone please advise? Thanks!</p>