GalCohen
(Gal Cohen)
1
Hi all,
What's a good way to develop a package and test it in a local project it? (Hopefully without pushing up changes to a branch, pulling them back down within the main project, etc).
mackoj
(Jeffrey Macko)
2
You can set a local path as dependency in your main project.
1 Like
afarnham
(Aaron Farnham)
3
Example of using a local path:
.package(path: "../MyDevProject"),
1 Like
@afarnham’s example will do it if both projects are packages. If the higher‐level one is an Xcode project (this thread is tagged with xcode), then the same can be accomplished by dragging the package directory into the Xcode project to include it into the same Xcode workspace. The documentation is here.
(Actually, if both projects are packages, there is also $ swift package edit MyDependency, but I’m not sure if Xcode recognizes that yet without the $ swift package generate-xcodeproj strategy.)
2 Likes
GalCohen
(Gal Cohen)
5
Ah, I see. I did forget to mention I was looking for an answer for xcode. Thanks for providing both!