Goal is to host a git repo for a Swift Package to distribute proprietary code as a binary in a XCFramework. The source code has dependencies on other Swift Packages. Listing the dependencies in the .package config is not enough. Simply asking consumers to import dependencies is not an option, as they may be making use of the same packages at different levels. The main problem I am trying to solve is how to resolve these dependencies when my Swift Package is imported into a project.
- Each dependency package should be archived and wrapped into the XCFramework as well, right?
- How would I do that?
The packages I am using are also available in a CocoaPod as well.
- Would it be easier to import them as pods for the purpose of archiving?
I have gone thru the following resources and SO posts, but can not find answer to this specific purpose.
- https://developer.apple.com/documentation/swift_packages/distributing_binary_frameworks_as_swift_packages
- https://developer.apple.com/videos/play/wwdc2019/416/
- https://medium.com/@anuragajwani/how-to-distribute-compiled-universal-ios-xcframeworks-using-swift-package-manager-8eaf8395985f
- https://www.appcoda.com/xcframework/
- Explicitly manage Swift Package nested dependencies required?
- XCFramework with Pods Dependencies (solution is to host a pod and not a swift package)