Closed tahoeschrader closed 1 month ago
After restarting my computer, the error is now the missing Main_iosKt
one:
/Projects/compose-multiplatform-ios-android-template/iosApp/iosApp/ContentView.swift:7:9: error: cannot find 'Main_iosKt' in scope
Main_iosKt.MainViewController()
Where is it even defined that the name of the package should be "Main_iosKt"? Is that just what main.ios.kt gets converted to under the hood? Either way, any help would be appreciated.
Hey @tahoeschrader,
I think you missed the following steps:
Hey @tahoeschrader,
I think you missed the following steps:
Hm, I see. A lot of documentation I've found online imply xcode will be called from Android Studio via the cli though. Especially considering this official template already has the xcode project files and whatnot already included.
I was under the impression i'd only need to do the step you're linking for a brand new multiplatform project id be writing from scratch without building off this template.
@tahoeschrader I have experience this error using the project template after corrupting the gradle.
I recommend you to re-download the gradle by removing the current caches
rm -rf ~/.gradle/caches/
Now its is fixed if you using Kotlin Multiplatform Wizard: https://kmp.jetbrains.com/?_gl=1*1ds9oqm*_ga*MzUzNzc0NzEuMTY5MjYxMjIxMA..*_ga_9J976DJZ68*MTY5OTAxNTg2NC4yMC4xLjE2OTkwMTc3MzcuMC4wLjA.&_ga=2.23061945.388460062.1699015864-35377471.1692612210
When open iosApp as Xcode project, make sure that you first build it in Android Studio, and then also build in Xcode, after that any errors of Xcode project must not appear and u can run project on any of you devices!
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Describe the bug I downloaded the iOS/Android template repo and can successfully build for android. iOS on the other hand is returning:
My version of cocoapods is 1.12.1 and I installed it via brew at
/opt/homebrew/bin/pod
Affected platforms Select one of the platforms below:
Versions
To Reproduce Steps and/or the code snippet to reproduce the behavior:
iosApp/iosApp.xcodeproj
as the Xcode Project FIle -> Apply -> OKiosApp
After this I also tried:
Then I tried deleting all the build folders, building the android app first, then iOS. No matter what I do or what order I try it, I get this error.
Expected behavior The iOS simulator should open up a virtual iPhone with the template app, aka no build errors.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Sometimes, rather than the error being re:
shared
it is thatMain_iosKt
doesn't exist in the space... which is an error I see in some recently closed issues for this project. The only problem is the "fix" was to run something that is supposed to work for iOS, which I am currently doing.