Hello everybody,
Is it possible to customize the name of the xcframework? The shared module is called "shared," and when compiling the XC framework, it retains the same name. Is it possible to customize it with other name?
My experience was with the default kmp Gradle task to generate the xcframework. Maybe cocoapods have the magic 🪄
g
Garrison Henkle
04/06/2024, 10:07 PM
This is what I do in my prod KMP app. No Cocoapods required:
Copy code
kotlin {
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64(),
).forEach { iosTarget ->
iosTarget.binaries.framework {
baseName = "SharedKotlin" // This is the line that changes the name
isStatic = true
}
}
}
Garrison Henkle
04/06/2024, 10:10 PM
If you are using the non-Cocoapods method of integrating KMP into iOS, don’t forget to update:
• imports in Swift
• The
Other linker options
field in Xcode (I think the flags are case-insensitive, but every example I’ve ever seen matches the case you use in