Xcode 16 & Package load failure

I have installed Sequoia and Xcode 16 and now I can't add packages to my (or any project). I just get a message saying the package can't be resolved. Basically I can't carry on developing.

SORT THIS OUT APPLE

I've started facing this issue when upgraded my system from macOS 14 (Sonoma) to macOS 15 (Sequoia) along with Xcode update from 16.1 to 16.2. I've tried all the above methods and nothing works me. What works for me was the following:

  1. Removed all Swift Package dependencies.
  2. Cleaned the build folder.
  3. Started building the project again.
  4. Added each package dependency one by one as the build process prompting the missing package error.

Met similar issue with Xcode16.2 Tried the handcraft methods in the threads, 'swift package resolve', downgrading to Xcode15.4

Finally, it works after I switch to another WiFi...

Hope this help

Same issue here. Large project, lots of dependencies.

XCODE fails.

Likely a good idea to raise an issue now with Feedback Assistant.

This is 20 years of Xcode and still can't do basic dependency management. :)

I used the Clear History from the SPM screen and then closed the SPM panel and reopened it and suddenly it was working again !

None of the solutions outlined here worked for me. The only way I got it to work was closing Xcode, deleting all the caches, then when adding my package: instead of choosing "Up to Next Major Version" as the dependency rule, I chose "Exact Version" and typed in the latest version number.

After that I could navigate to my top-level project, then on the "Package Dependencies" tab, change it to "Up to Next Major Version". That seems to work, at least for now.

For some people it might be worth checking your Package.resolved file to see whether it got corrupted or simply rolling it back to a previous version.

Swift Package manager was acting up for me for one specific project. Wouldn't add new packages, would not resolve existing packages, etc. It worked fine for other projects. I then took a look at the Package.resolved file and there seemed to be a merge conflict that wasn't pointed out by the repository tools. SPM started working as expected after resolving the conflicts.

Xcode 16 & Package load failure
 
 
Q