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: [
.library(
name: "MyPackage",
targets: ["MyPackage",
"App-Release" /* if config is debug, chooses App-Debug */]),
],
dependencies: [],
targets: [
depends on.
.target(
name: "MyPackages",
dependencies: []),
.binaryTarget(name: "App-Release",
path: "Sources/Release/App.xcframework"),
.binaryTarget(name: "App-Debug",
path: "Sources/Debug/App.xcframework")
]
)