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).
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).
You can set a local path as dependency in your main project.
Example of using a local path:
.package(path: "../MyDevProject"),
@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.)
Ah, I see. I did forget to mention I was looking for an answer for xcode. Thanks for providing both!