Shared/Interdependencies between packages and main app

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:

  1. A is the main app (iOS Xcode project)
  2. B is a feature package
  3. 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 version 0.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:

  1. Are dependencies isolated for each package and the main app when using Swift packages?
  2. Is having shared dependencies on packages the wrong way of using packages for Apple platform development (or in general)?
  3. If not, then how to have Xcode (or the Swift Package Manager) handle this without syncing up the versions for shared dependencies?