Marc Reichelt
10/26/2021, 6:17 PMval iosArm64 = iosArm64("iosArm64")
val iosSimulatorX64 = iosX64("iosSimulatorX64")
val iosSimulatorArm64 = iosSimulatorArm64("iosSimulatorArm64")
val xcFramework = XCFramework()
configure(listOf(iosArm64, iosSimulatorX64, iosSimulatorArm64)) {
binaries.framework {
baseName = frameworkName
xcFramework.add(this)
}
}
Now by executing ./gradlew assembleMyModuleNameXCFramework
(note to replace MyModuleName
with your real module name) it will create an xcframework with 2 folders (ios-arm64 and ios-arm64_x86_64-simulator).
It works! 🎉
Now I just need to find out how to tell the createSwiftPackage
task how to use the freshly created framework, because it seems to run a different task and create a framework without the iosArm64Simulator slice.