Hello everyone. I need help in understanding how are inter-dependencies between packages are resolved, if at all.
Scenario
An app (iOS) is using Swift packages. These packages have a shared dependency with one of the package:
- A is the main app (iOS Xcode project)
- B is a feature package
- C is a common code package
Dependencies
-
A is the main app that has a dependency on Swift package B at exact version
1.0.1
and Swift package C at exact version0.7.1
-
B is feature package that also has an internal dependency on C at exact version
0.6.1
In this scenario both A and B have a dependency on the C at different versions. Xcode (when building the main app) does not seem to like that.
Questions:
- Are dependencies isolated for each package and the main app when using Swift packages?
- Is having shared dependencies on packages the wrong way of using packages for Apple platform development (or in general)?
- If not, then how to have Xcode (or the Swift Package Manager) handle this without syncing up the versions for shared dependencies?