Hi! We’re trying to integrate KMP-NativeCoroutines...
# multiplatform
j
Hi! We’re trying to integrate KMP-NativeCoroutines in our app. We build a separate shared.xcframework that is integrated to the main app via cocoapods. So the main ios app and the shared kmm framework are in two different repos. I can see that the KMP-NativeCoroutines files are generated correctly but when build the xcframework and integrate it to the main app, the generated methods (the ObjcName) cannot be found by the main app
r
Hi! Could you share some more details about your project structure? Are the annotated declarations in the
shared
module, or are they part of a dependency?
j
The annotated declarations are in the shared module. In the shared module, we have a
SearchApi
interface and the
SearchApiImpl
class implements this. I placed the annotations in the methods of
SearchApi
and the main app has access only to
SearchApi
r
Alright in that case you are facing a limitation with interfaces and the generated extensions. Which unfortunately aren’t directly callable from Swift. You’ll likely be able to access them as static functions on a class called
SearchApiNativeKt
. You can workaround this limitation by defining the extensions in Swift: https://github.com/rickclephas/KMP-NativeCoroutines/issues/103#issuecomment-1501096118
thank you color 1
j
Ahh I see it now. Thank you!
👍🏻 1