https://kotlinlang.org logo
#compose-ios
Title
# compose-ios
r

Robert Zetzsche

11/17/2023, 7:45 AM
Hi guys, I'm currently researching compose for my company and a talk and stumbled across the current SwiftUI interop. Is there a way to integrate SwiftUI in compose and also update the SwiftUI component via a mutable state from kotlin site? I've used the "workaround" from here: https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-ios-ui-integration.html#use-swiftui-inside-compose-multiplatform
d

Dima Avdeev

11/17/2023, 3:58 PM
Hello! Yes, you used proper workaround for that! Also, in new version of Compose we will provide a better way to use UIViewController https://github.com/JetBrains/compose-multiplatform-core/pull/882 To use state, you can follow this article. One of our active users wrote it. https://proandroiddev.com/compose-multiplatform-managing-ui-state-on-ios-45d37effeda9
👍 1
j

Joel Denke

11/18/2023, 11:23 AM
Tried it myself, work bidirectional interop. However complex with coroutines and animations. No easy setup for that imo. Different approaches between Android and iOS. Easy to solve however.
👍 1