import androidx.compose.ui.window.ComposeUIViewController
actual fun getPlatformName(): String = "iOS"
fun MainViewController() = ComposeUIViewController { App() }
I got this error in
main.ios.kt
Cannot access class 'platform.UIKit.UIViewController'.
do I need to use a mac to solve it? I'm using the official template of compose multiplatform
j
Jacob Ras
07/17/2023, 11:29 AM
Yes,
UIKit
is an Apple thing, so only available on Apple hardware. Notice that this code lives in the
iosMain
directory, meaning it's specially written for iOS.
s
Saleem
07/17/2023, 12:01 PM
So, I can skip this for now and work in the shared module...
Thank you!