Is it possible to use iOS lib from kotlin code ? F...
# ios
o
Is it possible to use iOS lib from kotlin code ? For instance I’m trying to use Firebase. I have a simple
Presenter
in common module with the only method
onClick()
. I’d like to call this method from UI. In actual implementation for Android I can just import
Firebase
class and call method on it. But it is not the case for iOS actual implementation. Documentation states that
Objective-C frameworks and libraries can be used in Kotlin code if properly imported to the build (system frameworks are imported by default). See e.g. “Using cinterop” in Gradle plugin documentation. A Swift library can be used in Kotlin code if its API is exported to Objective-C with @objc
Does it means I have to create a
.def
file pointing to
Firebase.h
? Where should I place it? What options should I specify?