Xcode 26: Unable to find module dependency

Thank you, Mark. The same problem persists in the official release. Fixed by your suggestion.

Hello guys, still couldn’t figure it out can anyone help , and also I tried 2-3 different ways but didn’t work. any updates?

Any news about how to fix this? I’m having the same issue and after a good week of trying stuff I have not found a solution. I tried doing a fresh install of xcode because these errors only appear for me on xcode 16.2 when I run the project on 26 its fine. If I manage to find something I will let you know.

I’m currently having the same issue on Xcode 26.0.1 but only on a UITest project. Everything worked perfectly on Xcode 16.4. Tried setting “Explicitly Built Modules” to no but still having the same issue.

But we are also using spm packages and pods together in one project. And the module that’s missing is a pod.

How can this be fixed?

In case this helps someone else:

The variable name for Explicitly Built Modules changed in the project file between Xcode 16.4 and Xcode 26, and it doesn’t appear to migrate automatically. We changed the variable on our desk computers running 16.4, checked it into github, then ran our jenkins test job and still ran into the same issue. The jenkins test job is running on a lab computer running Xcode 26. Finally running a diff on the file shows that we needed to update the variable name manually (or on an updated version) and check it back in before Xcode 26 would see the change.

Xcode 16.4 variable name: _EXPERIMENTAL_SWIFT_EXPLICIT_MODULES

Xcode 26 variable name: SWIFT_ENABLE_EXPLICIT_MODULES

Both show up with the same human readable name in Xcode build settings and if we update it in 16.4 then 26 didn’t see it. We ended up manually editing the project.pbxproj file to add the new variable name and got past this issue.

2 Likes

thinks,I updated Xcode to 26.01, then I saw this error.

when I turn off Explicitly built, it’s all ok.

Is not the best solution but It’s a temporary fix that works for me in order to buy me time until I migrate all the Pods to SPM.

Added user defined variable in the Build Settings SWIFT_ENABLE_EXPLICIT_MODULES = NO

This is still an issue for me with Xcode 26.1. SWIFT_ENABLE_EXPLICIT_MODULES = NO does not fix the issue for me.

I am attempting to use Local Swift Packages from a Command-Line Tool and an App Extension target. Neither of them can import the local package and fail with the Unable to find module dependency / No such module issues.

has anyone found a solution? I’ve changed “explicitly built modules” to NO, deleted Version 26.2 (17C52) and redownloaded it, started a new Xcode project and same error, deleted the Package and re-installed it and same error. The odd thing that happens is that the error shows up and then it disappears, and then it shows up again and the error stays showing. Downloaded older versions of Xcode and same error.

Try disabling User Script Sandboxing. Go to Project > Target > Build Settings, search for User Script Sandboxing, and set it to No. and also set SWIFT_ENABLE_EXPLICIT_MODULE to NO (in build setting search Explicit Modules) This resolved the issue for me in Xcode 26.0 (17A324).