https://github.com/apple/swift-package-manager/blob/master/Documentation/Usage.md
Clibgit$ git init
Clibgit$ git add .
Clibgit$ git commit -m "Initial Commit"
Clibgit$ git tag 1.0.0
// other package
import PackageDescription
let package = Package(
name: "example",
dependencies: [
.package(url: "../Clibgit", from: "1.0.0")
//.package(path: "../Clibgit") // is also fine
]
)
And if you want to add to your app target.
File -> Swift Packages -> Add Package Dependency...
Enter package repository URL -> file:///Users/.../Clibgit -> Next.
Note: you need to commit to git here. If your package dose not commit to git, Xcode can't find it.