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

Abdul Basit

03/16/2024, 12:33 PM
Hi Everyone, My CMP app was working fine. Recently, i am getting issue of
Copy code
cannot find 'Main_iosKt' in scope
        Main_iosKt.MainViewController()
but the file is there.
Copy code
internal fun MainViewController() = ComposeUIViewController { AppViewIos() }
file name is
main.ios.kt
Any idea ? CMP version :
1.6.1
Deleted the main app, then was facing another issue which was fixed by this: https://kotlinlang.slack.com/archives/C3PQML5NU/p1650580641085819
Copy code
kotlin.mpp.applyDefaultHierarchyTemplate=true
If you disable that, then you will get the above error. When enabled, then works fine.
thank you color 1
a

avdim88

03/18/2024, 7:12 PM
Are you using Kotlin 1.9.20 and higher?
a

Abdul Basit

03/19/2024, 4:04 PM
1.9.20
5 Views