In order to improve our build times with the Swift Package Manager, we precompile all our 3rd party dependencies as XCFrameworks to use them as
.binaryTargets. We also keep the precompiled frameworks under source control in our repo, so we can reference them from the dependency
let package = Package( name: "Dependencies", ... targets: [ .binaryTarget( name: "ThirdPartyDependency1", path: "path-to/third-party-dependency-1.xcframework" ), .binaryTarget( name: "ThirdPartyDependency2", path: "path-to/third-party-dependency-2.xcframework" ), ... ] ...
but, unfortunately, we cannot reference them as
zip archives because it is currently possible only for the remote targets, for some reason. Keeping those XCFrameworks unzipped under source control is quite inconvenient because of:
- The long diffs on every binary target version update.
- Potentially higher fragmentation of the file system.
That's why I believe that supporting
zip archives for local
binaryTargets is a missing piece of functionality that could be in demand in the community.
What was the reasoning behind that design decision? If there are no fundamental restrictions I would love to provide a PR that fixes that.