How to build Swift Package as XCFramework

This should help as a starting point: Add option to define custom scheme for generated xcode project by PycKamil · Pull Request #2981 · apple/swift-package-manager · GitHub

Please keep in mind that frameworks can only contain a single module, so if you are trying to ship a package product that contains multiple targets, this approach won't work.

2 Likes