Matt’s Tidbits #106 — Resolving missing iOS Devices in KMP projects

Matthew Groves
Digital Products Tech Tales
2 min readMar 26, 2024

--

It’s been a while since I wrote with any frequency, but, I am hoping to get back into the swing of things in 2024!

I am currently working on a project using Kotlin Multiplatform, and was running into a strange issue where I couldn’t get even the stock KMP starter project to run on iOS from within Android Studio. Android worked just fine, but, when I went to set up an iOS run configuration in Android Studio, the “Execution target” list was completely empty.

Having never done this before, I wasn’t sure if I just didn’t understand how the tools were working — or if there was some kind of permissions issue. I tried a few things, including creating a new simulator, updating my version of Java, and more — I highly recommend the KDoctor program for checking your configuration — it highlighted a few problems — but, unfortunately, none of these solved the problem.

So, I turned to one of my favorite tricks, searching for bug reports. In this instance, I came across this issue which had been filed in JetBrains’ tracker: https://youtrack.jetbrains.com/issue/KT-61624/Empty-execution-target-drop-down-when-xcode-has-simulators-other-than-iPhones

This looked exactly like the issue I was facing! I opened up my XCode -> Devices and Simulators window, and sure enough, I had an Apple Vision Pro simulator listed (because who wouldn’t want to have the option to be able to develop for it?) Once I removed the Vision Pro simulator as the bug report recommended, Android Studio showed all of my iOS Simulators properly in the Execution target list.

Once I selected one, I was able to run my app on iOS from Android Studio!

Being a good steward, I commented on the issue on JetBrains’ board and voted for the issue to help boost its visibility. And, writing this article is another way I am hoping to boost awareness of this problem. I informed my team about this, and it has already helped a few people resolve this issue.

Thanks for reading and please follow our Digital Products Tech Tales publication to learn more about what our team is working on!

--

--