Will local or remote version of a package dependency in an app be bundled into the app's binary?

I have an Xcode project called App. App has a remote dependency on a package called Service. Because I'll be making frequent changes to Service, I've also added it as a local dependency to App.

When I archive App and get it ready for release, will my local version of Service be bundled into the app or will the remote version be?

(I intend to keep the remote and local versions in sync as best I can, but I'd still like to understand this behavior)


I don't recommend adding dependencies on two different versions of the same package. Even if it links successfully, it will lead to undefined behavior with two versions existing in memory. In that case, it won't be possible to say for sure which version will be used, leading to obscure and hard to diagnose bugs.

Thank you,

Also, after looking closer at Editing a package dependency as a local package, it does seem to recommend making the changes, pushing them, and then removing the local version.

When you’re done editing the local package, push your changes to its remote Git repository. When the changes have made it into the package’s next release, remove the local package from your project, and update the package dependency to the new version.