My org has very large app that currently has appx. internal 40 framework targets, some of which are nested within others, plus another 15 or so Carthage dependencies.
We'd like to transition to using Swift packages instead of frameworks, and using SPM instead of Carthage, but it's not feasible to transition everything at once. We need to migrate in phases.
We'd also like to start implementing any new modules from here on, using Swift packages, so we're not creating tech debt.
Normally in Xcode to link one module against some other module you drag the framework product into the "Frameworks & Libraries" list. Boom, done.
However with Swift packages, it seems the only way to define a dependency is if it's a Swift package AND you have all the source code.
There does not seem to be any way to link a build product (like a framework or library). Since most of our modules depend on prebuilt Firebase modules for analytics, that seems like a dealbreaker, unless I'm missing something.
As well, our CI pipeline currently uses fastlane to cache build artifacts so we don't have to compile everything from source with each run. How can we still take advantage of this if we migrate to using SPM instead of Carthage?
If we have multiple packages, say, that all depend some other package, does Xcode rebulid that dependency over and over when it builds each package?