Xcode 26: Unable to find module dependency

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.

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.

I use local SPM modules.

I guess try turning off explicitly built modules anyway?

I just tried it, same error.

I'm getting the same issue. Any resolution?

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

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 ...

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

Did anyone solve this issue? I have the same for one of my cocoa pods libraries (libsignal/swift at main · signalapp/libsignal · GitHub)

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

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.

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?

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.

1 Like