Migrating to SPM from mix of embedded frameworks and static libraries

What I did recently was this. I migrated all our org‘s frameworks to SPM and resolved their dependencies. Then to avoid duplicates in the main host app I came up with a good trick that works great for us.

Instead of embedding all different libs from packages through Xcode‘s UI, I created a project local package with a single library target/product. This local package would then have all the dependencies for our frameworks, which are now completely migrated to SPM. This moves completely all the static vs. dynamic linking resolution to SPM and avoids any duplicate symbols. The last step is only to embed the lib from the local package into the host app.

5 Likes