Saleem
07/17/2023, 11:02 AMimport 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 multiplatformJacob Ras
07/17/2023, 11:29 AMUIKit
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.Saleem
07/17/2023, 12:01 PMJacob Ras
07/17/2023, 12:02 PM