title: Store Main storyboard in a Swift Package
body: <p>I'm playing around with Swift Packages in Xcode. I was wondering if it's possible to move your app's &quot;main storyboard&quot; into a Swift Package. By &quot;main storyboard&quot;, I mean the one that's set in your <code>info.plist</code> under the key <code>NSMainStoryboardFile</code> (the human-readable name is <code>Main storyboard file base name (macOS)</code></p>
  <p>This is the folder structure of my package:</p>
  <pre><code>.
  ├── Package.swift
  ├── README.md
  ├── Sources
  │   └── FooPackage
  │       ├── FooPackage.swift
  │       └── Resources
  │           ├── Base.lproj
  │           │   └── Main\ Menu.storyboard
  │           └── img.png
  └── Tests
      └── FooPackageTests
          └── FooPackageTests.swift
  </code></pre>
  <p>This is my <code>package.swift</code> file, unchanged from the Xcode template:</p>
  <pre class="lang-swift prettyprint-override"><code>// swift-tools-version:5.5
  // The swift-tools-version declares the minimum version of Swift required to build this package.
  
  // swift-tools-version:5.3
  
  import PackageDescription
  
  let package = Package(
      name: &quot;FooPackage&quot;,
      defaultLocalization: &quot;en&quot;,
      products: [
          // Products define the executables and libraries a package produces, and make them visible to other packages.
          .library(
              name: &quot;FooPackage&quot;,
              targets: [&quot;FooPackage&quot;]),
      ],
      dependencies: [
          // Dependencies declare other packages that this package depends on.
          // .package(url: /* package url */, from: &quot;1.0.0&quot;),
      ],
      targets: [
          // Targets are the basic building blocks of a package. A target can define a module or a test suite.
          // Targets can depend on other targets in this package, and on products in packages this package depends on.
          .target(
              name: &quot;FooPackage&quot;,
              dependencies: []),
          .testTarget(
              name: &quot;FooPackage&quot;,
              dependencies: [&quot;FooPackage&quot;]),
      ]
  )
  </code></pre>
  <p>In a unit test, I check if my storyboard is accessible, and it is:</p>
  <pre><code>print(Bundle.module.path(forResource: &quot;Main Menu&quot;, ofType: &quot;storyboard&quot;)!)
  // =&gt; /Users/Alex/FooPackage/.build/x86_64-apple-macosx/debug/FooPackage_FooPackage.bundle/Base.lproj/Main Menu.storyboard
  </code></pre>
  <p>As you see, I access it via <code>Bundle.module</code>. Other apps that include this Swift Package won't have access to that accessor. From what I can tell, this is an intended design: your package is expected to expose its &quot;shared&quot; bundle resources using explicitly defined public APIs.</p>
  <p>Nonetheless, that doesn't appear compatible with the <code>info.plist</code> expectation that the main storyboard resides in the main bundle. Is there a way around this?</p>