Kotlin Multiplatform Mobile plugin version: 0.2. KMM and iOS use different build tools and dependency managers For iOS, instead, the situation is more challenging. Question: How can I make the type of CFlow to be known in Xcode iOS project? This is weird because in both kotlinconf-app and here the return types of functions are preserved and there is no casting involved in their codebase. When I try to call this functions in iOS swift code the return type of the functions get converted to CFlow and inside of watch function the type of array is Any. With KMM, you can develop multiplatform mobile applications and share parts of your applications between Android and iOS, such as core layers, business logic, presentation logic, and more. Repository example functions: fun getData1(): CFlow> KMM with iOS Arm64 Binary Framework (. KMM (Kotlin Multiplatform Mobile) is an SDK for cross-platform mobile development. launchIn(CoroutineScope(Dispatchers.Main + job)) I took the code for CFlow from kotlinconf-app and here: fun Flow.asCFlow(): CFlow = CFlow(this)Ĭlass CFlow(private val origin: Flow) : Flow by origin. My shared module contains Repository class which has two functions that return a list of items wrapped in a custom class extending Flow called CFlow.
0 Comments
Leave a Reply. |