The linker plugin is not applying the compiler args when using the new DSL for Kotlin/Native artifacts: https://kotlinlang.org/docs/multiplatform-native-artifacts.html.
I can work around it by specifying the compiler args manually:
kotlinArtifacts {
Native.XCFramework("sdk") {
targets(iosX64, iosArm64, iosSimulatorArm64)
setModules(
project(":shared"),
project(":lib")
)
// Add this:
kotlinOptions {
freeCompilerArgs = listOf(
"-linker-options",
"-U _FIRCLSExceptionRecordNSException " +
"-U _OBJC_CLASS_\$_FIRStackFrame " +
"-U _OBJC_CLASS_\$_FIRExceptionModel " +
"-U _OBJC_CLASS_\$_FIRCrashlytics"
)
}
}
}
The linker plugin is not applying the compiler args when using the new DSL for Kotlin/Native artifacts: https://kotlinlang.org/docs/multiplatform-native-artifacts.html.
I can work around it by specifying the compiler args manually:
kotlinArtifacts { Native.XCFramework("sdk") { targets(iosX64, iosArm64, iosSimulatorArm64) setModules( project(":shared"), project(":lib") ) // Add this: kotlinOptions { freeCompilerArgs = listOf( "-linker-options", "-U _FIRCLSExceptionRecordNSException " + "-U _OBJC_CLASS_\$_FIRStackFrame " + "-U _OBJC_CLASS_\$_FIRExceptionModel " + "-U _OBJC_CLASS_\$_FIRCrashlytics" ) } } }