Hi everyone, i am having an issue importing Compos...
# compose-ios
m
Hi everyone, i am having an issue importing ComposeUIViewController in iOS APP, i have a sample KMP project that am migrating to compose KMP. Trying to import composable function in the iOS app using ComposeUIViewController but getting
Cannot find 'ComposeUIViewController' in scope
I can verify that the
Shared
framework is there but doesn't have
ComposeUIViewController
. i have added
implementation(compose.ui)
to iosMain and commonMain dependencies.
Copy code
kotlin = "2.1.0"
compose-plugin = "1.7.1"
j
I may have misunderstood but sounds like you're trying to use
ComposeUIViewontroller
in iOS Swift/SwiftUI code? It should be used instead in
iOSMain
...for example https://github.com/joreilly/VertexAI-KMP-Sample/blob/main/composeApp/src/iosMain/kotlin/dev/johnoreilly/vertexai/MainViewController.kt
gratitude thank you 1
You would use
UIViewControllerRepresentable
then in SwiftUI to consume that e.g. https://github.com/joreilly/VertexAI-KMP-Sample/blob/main/iosApp/iosApp/ContentView.swift