SPM - Swift packages are not supported when using legacy build locations, but the current project has them enabled.

I want to install the library using Swift package manager However, I get the following error.

Do you know the solution?

Thank you

Replies

Look in Xcode > Preferences > Locations, and ensure the values are set to Default.

I meet the same problem. I changed build path to $SRCROOT/build, and found this error. Then I changed it back as "build", but the build path still appears under $SRCROOT. Xcode > Settings > Locations are all set to Default. Add package in project stays at this page forever. Tried clear DerivedPath, quit and restart Xcode, reboot macbook, none of these work.

Xcode Version 14.3.1 (14E300c) macOS version 13.5 (22G74)

Add a Comment