title: How do I add a dependency to RealmSwift in my Package.swift file?
body: <p>I've been struggling with this a bit, and I've gotten very close.
  I want to build a swift package that contains code that imports RealmSwift.
  Xcode is able to parse the file and download the code for the packages. But I get &quot;No such module 'RealmSwift' for each file that includes it. This is my Package.swift file. Does anyone see anything wrong with it?</p>
  <pre><code>// swift-tools-version:5.3
  // The swift-tools-version declares the minimum version of Swift required to build this package.
  
  import PackageDescription
  
  let package = Package(
      name: &quot;TCA&quot;,
      platforms: [
          .iOS(.v14)
      ],
      products: [
          // Products define the executables and libraries a package produces, and make them visible to other packages.
          .library(
              name: &quot;TCA&quot;,
              targets: [&quot;TCA&quot;]),
      ],
      dependencies: [
          .package(name: &quot;Realm&quot;, url: &quot;https://github.com/realm/realm-cocoa&quot;, .exact(&quot;5.3.3&quot;)),
      ],
      targets: [
           .target(
              name: &quot;TCA&quot;,
              dependencies: [
                  .product(name: &quot;RealmSwift&quot;, package: &quot;Realm&quot;)
              ]),
          .testTarget(
              name: &quot;TCATests&quot;,
              dependencies: [&quot;TCA&quot;]),
      ]
  )
  </code></pre>