Xcode 12.0/Swift 5.3 toolchain introduced support for binary targets in Swift Package Manager.
While the feature works perfectly for single binary targets, is there a possibility to declare binary subdependencies for the binary targets?
In a scenario:
where binary package frameworkA is subdependency of binary package frameworkB and frameworkC
and furtherly all 3 binaries live in different repos
Im not able to find a way how to correctly declare the frameworkA as subdependency for frameworkB and frameworkC.
What I've tried sofar:
- use the
Packagedeclaration. e.g. for frameworkB to pass in subdependency of frameworkA, e.g.
dependencies: [ .package(url: "url-to-repo-with-frameworkA", .exact("1.0.0")) ]
At the integration point, the Xcode 12.0 beta 6 won't pick the specified subdependency frameworkA, only the added binary target, in this case frameworkB, will be added, which results in broken integration.
- declare frameworkA as another binary target in package manifest for frameworkB and frameworkC.
This works fine when importing either frameworkB or frameworkC to the project.
Integrating both binary packages in Xcode 12.0 beta 6 results in "multiple targets named frameworkA in frameworkB, frameworkC" error.
Thanks for any help/guidance in advance!