Tristan
06/04/2025, 5:12 PMFedor Ihnatkevich
06/04/2025, 5:19 PMKotlinModules
framework built from Kotlin. Depending on cocoapods or other iOS specific dependencies in Kotlin is not supported. Does this help?Tristan
06/04/2025, 5:27 PM// commonMain
expect object TheLibrary {
fun theMethod()
}
// iosMain
import cocoapods.MyLibrary
actual object TheLibrary {
actual fun theMethod() = Mylibrary.theMethod()
}
// androidMain
import com.company.MyLibrary
actual object TheLibrary {
actual fun theMethod() = Mylibrary.theMethod()
}
I am looking to do something similar using Amper. I am not sure this suggestion covers that use case.François
06/04/2025, 5:30 PMFrançois
06/04/2025, 5:31 PMFedor Ihnatkevich
06/04/2025, 5:35 PMI am looking to do something similar using Amper. I am not sure this suggestion covers that use case.Ah, I see. No, currently Amper doesn't support for Kotlin code to depend on cocoapods / use cinterop. We may add support for these features in some form in the future.
François
06/04/2025, 5:37 PMTristan
06/04/2025, 6:19 PM