Hello , question about KMM and swift framework. I ...
# multiplatform
n
Hello , question about KMM and swift framework. I wanted to integrate it in Shared module. Doing so by docs https://kotlinlang.org/docsmultiplatform-mobile-ios-dependencies.html results in error module not found. Did someone had the same and how to resolve this? Maybe someone have Open source sample ?
h
What do you mean with
I want to integrate it
? Do you want to use a Swift framework in Kotlin?
n
Yes
h
Unfortunately, you can't use Swift from Kotlin. Kotlin only supports Objective-C. You can use Kotlin from Swift because the Kotlin compiler exports your Kotlin code to Objective-C and Swift is able to import Objective-C. But if the Swift framework also exports Objective-C, you could import this Objective-C lib in Kotlin.
n
So, if it will export Objective-C(A Swift library can be used in Kotlin code if its API is exported to Objective-C with @objc.), I should not get this : fatal error: module 'MyFramework' not found?
h
I think so