Should android studio and the "kotlin multiplatafo...
# multiplatform
j
Should android studio and the "kotlin multiplataform mobile" plugin work allright with xcode 15.2? The compatibility list indicates xcode 15.0. Could this difference on the minor verson cause android studio to not recognize ios simulators?
a
Do you have the latest version of the KMM plugin?, what template did you use for your project?
I do have Xcode 15.2 and a pet KMP project
I added desktop and web, but the other 2 should appear on your IDE
j
I have version "Kotlin Multiplataform Mobile" v 0.8.2(231)-25
a
I have the same, what happens when you run
kdoctor
in your terminal?
j
the template for the project was from the KMM wizard, which I found linked on tutorial
all green with kdorctor
Conclusion: ✓ Your operation system is ready for Kotlin Multiplatform Mobile Development!
This wizard: Kotlin Multiplatform Wizard Also, I clicked to share both logic and UI
one details is that the iosApp configuration did not came out of the box from the wizard. I had to click to configure it.
a
Ok, lets try this:
j
is there a way for me to "build kotlin to ios", such that I can open the project "iosApp" on xcode and run the simulator from there?
💯 1
yes black 1
a
click on the
Edit Configurations
, on the new window, click on the + sign
Do you see this option?
j
I tried this, but on this screen I get an empty list of "execution target"
Do you see this option?
Yes I see it
a
oh, ok, you have the choice to run the iOS app, what you don't have is the simulator to run it
Screenshot 2024-02-21 at 17.03.26.png
j
yes! I am missing the simulator
how did you get that iPhone 15 to show up there?
I noticed this error when trying again:
Error: Please specify Xcode project location
a
Open Xcode -> go to Settings -> Platforms -> click on the + sign -> select iOS simulator and select iOS 17
j
i have quite a few of these
also, the simulator runs ok from within xcode
i think i'm hitting a similar problem
so...it seems I should be able to run the KMP project from within xcode
a
Have you tried running the project from Xcode?
j
i get "no such module ComposeApp"
hm i guess i need to export the KMP project inside the iosApp dir somehow
a
I have no idea on that case
You could try using this template to see if you have the same error: https://terrakok.github.io/Compose-Multiplatform-Wizard/
j
will do!
thanks!
that is one fancy template
any idea where this comes from?
a
It's from one of the members of the Jetbrains team, you can select the libraries you want to include in your project
You can use either one
j
well it did not work out of the box
i got errors when building
jbr/Contents/Home//bin/java: cannot execute: No such file or directory
something weird with the location of java maybe
looks fixable
hm even if the build is broken, the run configuration at least identifies the simulators
kkkkkkkkkkkk
now it shows on my project as well
one thing I did in the mean while was to run "gradelw assemble" from the command line
👍 1
omg the simulator is working from android studio
and now the template from the jetbrain guy is also working. I had to fix something w/ my JAVA_HOME var.
well thanks @Alejandro Rios! Your support had me not give up on this! That was awesome
👍 1
108 Views