I opened the <https://github.com/JetBrains/compose...
# compose
n
I opened the https://github.com/JetBrains/compose-multiplatform-ios-android-template project. However when i open iosApp.xcodeproj in Xcode i get an error :
Cannot find 'Main_iosKt' in scope
inside
*struct* ComposeView: UIViewControllerRepresentable {
*func* makeUIViewController(context: Context) -> UIViewController {
Main_iosKt.MainViewController()
}
*func* updateUIViewController(_ uiViewController: UIViewController, context: Context) {}
}
I have tried clean and rebuild project and it does not work. Any ideas?
p
Instead of opening
.xcodeproj
try opening
.workspace
. I believe I read somewhere that it will trigger cocoapods to generate some files for xCode
n
@Pablichjenkov Thanks i actually just uninstalled and reinstalled ruby using brew, and now kdoctor gives all ok, but now for some reason Xcode says that
No such module 'shared'
even though before this error would go away if you just run on the simulator but now the build just fails 😵‍💫
i
Instruction how to run from Android Studio: https://github.com/JetBrains/compose-multiplatform-ios-android-template#on-ios Missing modules in Xcode sounds like some missing CocoaPods step. Please try to run pod install manually
p
Above mentioned ☝️ and you can try a clean up before, xCode is a bit slow to react. You can check the generated shared framework is under shared/build folder. If not run the gradle task that generates the framework. Under shared gradle tasks locate cocoapods and run the generatePodFramework ones