# Xcode 26: Unable to find module dependency

**URL:** <https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516>\
**Category:** Package Manager\
**Created:** [June 17, 2025, 1:08pm UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516 "2025-06-17T13:08:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmjauer](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jmjauer/32/15911_2.png) [@jmjauer](https://forums.swift.org/u/jmjauer)\
**Post date:** [June 17, 2025, 1:08pm UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/1 "2025-06-17T13:08:41Z")

</div>

With Xcode 26 beta I get the following error in my project for all my local packages:

`Unable to find module dependency`

This happens only when I build for macOS. The project builds without any issues with Xcode 16.

Edit: Also does not build when building for a real iOS device.

---

<div class="post-metadata">

**Author:** ![Jon889](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jon889/32/3139_2.png) [@Jon889](https://forums.swift.org/u/Jon889)\
**Post date:** [June 20, 2025, 8:46am UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/3 "2025-06-20T08:46:06Z")

</div>

Do you use CocoaPods? It seems CocoaPods doesn't work with Explicitly built modules which are turned on in Xcode 26. If you enable it in Xcode 16 then it also breaks there.

---

<div class="post-metadata">

**Author:** ![jmjauer](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jmjauer/32/15911_2.png) [@jmjauer](https://forums.swift.org/u/jmjauer)\
**Post date:** [June 20, 2025, 8:47am UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/4 "2025-06-20T08:47:42Z")

</div>

I use local SPM modules.

---

<div class="post-metadata">

**Author:** ![Jon889](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jon889/32/3139_2.png) [@Jon889](https://forums.swift.org/u/Jon889)\
**Post date:** [June 20, 2025, 9:24am UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/5 "2025-06-20T09:24:00Z")

</div>

I guess try turning off explicitly built modules anyway?

---

<div class="post-metadata">

**Author:** ![jmjauer](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jmjauer/32/15911_2.png) [@jmjauer](https://forums.swift.org/u/jmjauer)\
**Post date:** [June 21, 2025, 2:35pm UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/6 "2025-06-21T14:35:01Z")

</div>

I just tried it, same error.

---

<div class="post-metadata">

**Author:** ![leogdion](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/leogdion/32/14070_2.png) [@leogdion](https://forums.swift.org/u/leogdion)\
**Post date:** [July 3, 2025, 7:43pm UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/7 "2025-07-03T19:43:19Z")

</div>

I'm getting the same issue. Any resolution?

---

<div class="post-metadata">

**Author:** ![jmjauer](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jmjauer/32/15911_2.png) [@jmjauer](https://forums.swift.org/u/jmjauer)\
**Post date:** [July 4, 2025, 8:26am UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/8 "2025-07-04T08:26:58Z")

</div>

I haven't found a solution. However, creating a new project and adding all the files and settings worked.

---

<div class="post-metadata">

**Author:** ![leogdion](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/leogdion/32/14070_2.png) [@leogdion](https://forums.swift.org/u/leogdion)\
**Post date:** [July 4, 2025, 2:44pm UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/9 "2025-07-04T14:44:06Z")

</div>

I'm using XcodeGen to build my Xcode Project and a local Swift Package dependency.

2 things fixed this:

- ONLY\_ACTIVE\_ARCH: YES
- Fix all dependency warnings on Swift Package:

> is missing a dependency on because dependency scan of Swift module discovered a dependency on ...

---

<div class="post-metadata">

**Author:** ![taoabc](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/taoabc/32/41992_2.png) [@taoabc](https://forums.swift.org/u/taoabc)\
**Post date:** [July 7, 2025, 8:12am UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/10 "2025-07-07T08:12:05Z")

</div>

Same issue, I got:

Unable to find module dependency: 'Testing'

When I add dependency Testing, the app crashes during launch with error : Library not loaded: @rpath/Testing.framework/Testing

---

<div class="post-metadata">

**Author:** ![romaHerman](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/romaherman/32/42079_2.png) [@romaHerman](https://forums.swift.org/u/romaHerman)\
**Post date:** [July 11, 2025, 11:11am UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/11 "2025-07-11T11:11:37Z")

</div>

Did anyone solve this issue? I have the same for one of my cocoa pods libraries ([libsignal/swift at main · signalapp/libsignal · GitHub](https://github.com/signalapp/libsignal/tree/main/swift))

---

<div class="post-metadata">

**Author:** ![Strafe86](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@Strafe86](https://forums.swift.org/u/Strafe86)\
**Post date:** [July 15, 2025, 1:59pm UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/12 "2025-07-15T13:59:55Z")

</div>

I'm also experiencing this issue for a Cocoapods package. Any updates?

---

<div class="post-metadata">

**Author:** ![markltownsend](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/markltownsend/32/42271_2.png) [@markltownsend](https://forums.swift.org/u/markltownsend)\
**Post date:** [July 25, 2025, 4:33pm UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/13 "2025-07-25T16:33:51Z")

</div>

I received a similar error after loading a personal project into Xcode 26 beta 4 for the first time. The specific error was:  
"Compilation search paths unable to resolve module dependency: '\_Testing\_Foundation'"

After reading this thread, I turned off "Explicitly Built Modules" in the target and that fixed the issue.

One user mentioned that after setting that build setting to NO, to fix SPM build problems and then turn it back on. I tried that and I still got the error message.

So, my conclusion is that this is a bug in the compiler/linker that will soon be fixed in future betas. I'd create a FB, but I am not sure how to replicate it in a simple project.

---

<div class="post-metadata">

**Author:** ![kemkriszt](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/kemkriszt/32/42418_2.png) [@kemkriszt](https://forums.swift.org/u/kemkriszt)\
**Post date:** [August 7, 2025, 1:25pm UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/14 "2025-08-07T13:25:54Z")

</div>

After turning off Explicitly Built Modules, it only leads to an other issue (not sure if this is progress or not)

The new error says “Failed to import bridging header…”  
Has anyone seen this?

---

<div class="post-metadata">

**Author:** ![H.S](https://avatars.discourse-cdn.com/v4/letter/h/85e7bf/32.png) [@H.S](https://forums.swift.org/u/H.S)\
**Post date:** [August 26, 2025, 10:44am UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/15 "2025-08-26T10:44:56Z")

</div>

I am also building an app with Xcode 26 beta 5, but I am unable to resolve the import dependency of opencv2. I can build it by turning off explicitly built modules, but I am unable to use some of the app's functions, so I would like to know if there is another way to fix this.

---

<div class="post-metadata">

**Author:** ![bcbeta](https://avatars.discourse-cdn.com/v4/letter/b/ba8739/32.png) [@bcbeta](https://forums.swift.org/u/bcbeta)\
**Post date:** [August 29, 2025, 8:52pm UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/16 "2025-08-29T20:52:49Z")

</div>

Xcode 26 beta 7 is giving me all these compile errors. When I turn off explicitly built modules I get a different set of errors. I broke something badly ☹

 ![Screenshot 2025-08-29 at 2.40.02 PM](https://global.discourse-cdn.com/swift/original/3X/e/2/e2d5700579856df651622b6379a28dc21a9a02e3.png)

---

<div class="post-metadata">

**Author:** ![dbmrq](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/dbmrq/32/42675_2.png) [@dbmrq](https://forums.swift.org/u/dbmrq)\
**Post date:** [September 1, 2025, 5:02am UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/17 "2025-09-01T05:02:32Z")

</div>

Beta 7 started giving me the \_Testing\_Foundation issue described above and none of the suggestions fixed it. What did fix it was that I realized I had files with `import Testing` on my main target. Fixing that is what did the trick.

---

<div class="post-metadata">

**Author:** ![sandammeer](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/sandammeer/32/42806_2.png) [@sandammeer](https://forums.swift.org/u/sandammeer)\
**Post date:** [September 11, 2025, 9:19am UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/18 "2025-09-11T09:19:12Z")

</div>

I get the same issue on XCode26 RC in a cocoapods project for the dependency Nimble and tested turning off explicitly build modules and setting ONLY\_ACTIVE\_ARCH to yes but it still does not work.

Has anyone found a solution to this issue yet?

---

<div class="post-metadata">

**Author:** ![squarefrog](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/squarefrog/32/25528_2.png) [@squarefrog](https://forums.swift.org/u/squarefrog)\
**Post date:** [September 15, 2025, 10:14am UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/19 "2025-09-15T10:14:26Z")

</div>

I’m seeing this with Xcode 26 RC1, but we only use local swift packages. We only see the errors when we build for testing. One of the packages raising the warning has an explicit dependency on the other, so I have no idea what this warning is trying to tell us. Turning explicitly built modules off and only building active architecture doesn’t not help.

```swift
let package = Package(
    name: "ios-ui-library",
    platforms: [
        .iOS(.v16),
    ],
    products: [
        .library(
            name: "DesignSystem",
            targets: ["DesignSystem"]
        ),
        .library(
            name: "FoundationPod",
            targets: ["FoundationPod"]
        ),
        .library(
            name: "Theme",
            targets: ["Theme"]
        ),
    ],
    dependencies: [
        .package(url: "https://github.com/onevcat/Kingfisher.git", from: "8.4.0"),
        .package(url: "https://github.com/SnapKit/SnapKit", from: "5.7.0"),
    ],
    targets: [
        .target(
            name: "DesignSystem",
            dependencies: [
                .target(name: "FoundationPod"),
                .target(name: "Theme"),
                .product(name: "Kingfisher", package: "Kingfisher"),
                .product(name: "SnapKit", package: "SnapKit"),
            ],
            swiftSettings: [
                .enableExperimentalFeature("StrictConcurrency"),
            ]
        ),
        .target(
            name: "FoundationPod",
            dependencies: [],
            resources: [
                .process("Resources"),
                .process("Assets.xcassets"),
            ],
            swiftSettings: [.enableExperimentalFeature("StrictConcurrency")]
        ),
        .target(
            name: "Theme",
            dependencies: [
                .target(name: "FoundationPod"), // Explicit dependency here
            ],
            swiftSettings: [.enableExperimentalFeature("StrictConcurrency")]
        ),
        .testTarget(
            name: "DesignSystemTests",
            dependencies: ["DesignSystem", "FoundationPod"]
        ),
        .testTarget(
            name: "FoundationPodTests",
            dependencies: ["FoundationPod"]
        ),
    ]
)

```

In one of the files in the `Theme` package, we `import FoundationPod`.

 ![Screenshot 2025-09-15 at 11.15.06](https://global.discourse-cdn.com/swift/original/3X/b/a/ba006b87ca9a83dcc698f3544f27b698b172c73f.png)

---

<div class="post-metadata">

**Author:** ![bes](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/bes/32/27706_2.png) [@bes](https://forums.swift.org/u/bes)\
**Post date:** [September 16, 2025, 1:12pm UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/20 "2025-09-16T13:12:54Z")

</div>

Trying to build our test target on XCode 26 failed with the same error. Turning off Explicitly Built Modules for the test target worked.

---

<div class="post-metadata">

**Author:** ![bburroughs](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@bburroughs](https://forums.swift.org/u/bburroughs)\
**Post date:** [September 25, 2025, 3:34pm UTC](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516/21 "2025-09-25T15:34:46Z")

</div>

Worked for me as well, although I don’t understand why

[Next page](https://forums.swift.org/t/xcode-26-unable-to-find-module-dependency/80516.md?page=2)
