https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
d

Dmytro Serdiuk

09/28/2023, 5:00 PM
Hello! I’m working on KMM project and found in documentation the next gradle setting enableCInteropCommonization. Couldsomebody explain the purpose of it?And how it helps for the shared ios source set? Thank you!
r

Rick Clephas

09/28/2023, 7:04 PM
cinterop is performed for the final targets. So lets say you have the following targets: •
iosSimulatorArm64
iosX64
iosArm64
They all have their own version of an ObjC declaration generated by the cinterop task for that target. Now your project likely has an
iosMain
source set that contains all iOS specific Kotlin code. cinterop commonization will make sure that all common declarations from your iOS targets are available in your
iosMain
source set.
👍 1
d

Dmytro Serdiuk

09/28/2023, 7:05 PM
got you, thank you for explanation!
👍🏻 1
3 Views