How to add local Swift Package as dependency?

The proper way to add a local Swift Package is via menu in Xcode:
Swift Packages -> Add Package Dependency...
And type the full URL pointing to your package folder, starting from file:// prefix (it is a local URL after all).

Take note, only the committed changes in the package propagate to the project builds. I.e. it behaves like a fully remote package, despite the fact that you can still edit its sources from the same Xcode project.

2 Likes