In SwiftPM, you may want to add a local Swift Package to your project. For example, if you want to work with projects and dependent packages in a single repository (mono repo).
According to Swift PM Lead Developer's Answer, drag a package into your project It's OK if you drop and drop it, but at least it didn't work in my environment (although this answer is "the way it should be", so I think it will be resolved in a future update).
This article summarizes the current workaround in my environment (2020/11/15).
git init; git add.; git commit -m "init"
)file: /// Users / n / d / expProject / expdat / swiftPackage
.file: //
Then find the path specified in 4. and replace it with a relative path. For example, ./expdat/swiftPackage
..git
directory from the Swift Package directory.At the time of 4.
, the addition to the project has already been completed, but it can only be handled locally, and it will not be possible to push with Git or the like. In order to solve it, we are following the steps of 5.
and 6.
.
that's all.
Recommended Posts