Add your published Swift package as a local package to your app’s project and develop the package and the app in tandem.
- Swift Package Manager
Swift packages are a convenient and lightweight solution for creating a modular app architecture and reusing code across your apps or with other developers. Over time, you may want to develop your published Swift package in tandem with your app, or even create a sample or demo app. You can leverage the behavior whereby a local package overrides a package dependency with the same name, as follows:
Add the Swift package to your app as a package dependency instead of a local package, as described in Editing a Package Dependency as a Local Package.
Develop your app and your Swift package in tandem, and push changes to their repositories.
When you release a new version of your Swift package, remove the local package from the app and update your package dependency to the latest version.