Distribute different binary target in SPM using different configuration

I have multiple Flutter xcframework that I want to version by creating a Swift Package. However I have two binaries for each configuration. One for release and one for debug. How do I create a package that chooses the target depending on the configuration?

If it helps to visualize:

let package = Package(
    name: "MyPackage",
    products: [
            name: "MyPackage",
            targets: ["MyPackage",
                      "App-Release" /* if config is debug, chooses App-Debug */]),
    dependencies: [],
    targets: [
 depends on.
            name: "MyPackages",
            dependencies: []),
        .binaryTarget(name: "App-Release",
                      path: "Sources/Release/App.xcframework"),
        .binaryTarget(name: "App-Debug",
                      path: "Sources/Debug/App.xcframework")

This isn't possible at this time.

Terms of Service

Privacy Policy

Cookie Policy