You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to necessary iOS libraries being unable to be used in the KMP Module's commonMain, the implementation of this interface is created in the Android app code and the iOS app code and injected into the commonMain code with Koin.
Example implementation in iOS:
class IOSExampleManager: ExampleManager {
// overridden functions here
}
I am using KMP-Coroutines version 1.0.0-ALPHA-10 (for Kotlin 1.8.21 compatibility). I see it does generate the functions within a new NativeKt interface, but how may I override this on iOS/Swift to provide the implementation? I have read the README on the interface workaround with the extension (as well as this thread https://github.com/rickclephas/KMP-NativeCoroutines/issues/103), but I'm still confused on how I can override a method from the interface (e.g. signUp). Thanks!
The text was updated successfully, but these errors were encountered:
Hi! At the moment the library only supports Kotlin to Swift cases. Swift to Kotlin cases (like implementing an interface) are still a work in progress. Please keep an eye on #42
Hey!
I have trouble figuring out how I can use this library to help override suspend functions from an interface declared in
commonMain
of a KMP project.I am unable to share my entire code, but this is what it generally looks like (for the sections I'm confused on).
Project structure is similar to this:
With the Android and iOS app in their own repos and ingesting the KMP Module as a submodule (in Android) and as a static framework (in iOS).
I have an interface (
ExampleManager
) in a file (ExampleManager.kt
) located inKMPModule/exampleModuleA/commonMain
.Due to necessary iOS libraries being unable to be used in the KMP Module's
commonMain
, the implementation of this interface is created in the Android app code and the iOS app code and injected into thecommonMain
code with Koin.Example implementation in iOS:
I am using KMP-Coroutines version 1.0.0-ALPHA-10 (for Kotlin 1.8.21 compatibility). I see it does generate the functions within a new NativeKt interface, but how may I override this on iOS/Swift to provide the implementation? I have read the README on the interface workaround with the extension (as well as this thread https://github.com/rickclephas/KMP-NativeCoroutines/issues/103), but I'm still confused on how I can override a method from the interface (e.g.
signUp
). Thanks!The text was updated successfully, but these errors were encountered: