I'm just curious about this; has anyone tried embe...
# compose-ios
a
I'm just curious about this; has anyone tried embedding SwiftUI inside Compose Multiplatform? Curious if it works any sort of well
j
Yes but very clumpsy syntax compared to Android view equivalent. It works but feels uhm unnatural
a
Thanks for the response. How is the performance? I guess what I'm thinking about is if I want to do a full in-place replacement of a compose multiplatform screen with a swift UI one
Use Compose Multiplatform for most screens, SwiftUI when needed
I recommend ditch Swift ui as much as possible. I strive for zero Swift code myself. Performance depends what you doing. I havent tested large scale and only testing in iOS simulator. I dont own an iPhone 😁
a
Fair enough!
j
From my experience swiftui never needed if go compose multiplatform. More to interact with iOS SDKs and objc uikit components but sparely.
But also I am not an iOS expert. So wouldnt take my advice that heavy weight.
c
There is a presentation (I think it was from KotlinConf) that demonstrated when you would need to embed a SwiftUI View inside a Composable and how to do it. Typical examples are platform-specific things like CameraView, MapView, Video players, WebView etc. Of course you could also do this by embedding a UIKitView but it is likely that there us a SwiftUI wrapper for the platform native functionality already.
a
If you can find that presentation I'd love to see it. I want to make sure doing that doesn't cause any odd performance issues
c

https://www.youtube.com/watch?v=FWVi4aV36d8

k
i tried it for text field but using a interface that is then implemented by a uiview, the uiview is then used inside compose multiplatform. Its not not good