Hi folks! We're excited to share that a new Kotlin...
# multiplatform
i
Hi folks! We're excited to share that a new Kotlin Multiplatform plugin is available in the dev channel for IntelliJ IDEA 2025.1.1.1 and Android Studio Narwhal 2025.1.1. We encourage you to install it and explore the improved KMP development experience. Your testing and feedback on this build are crucial for us as we prepare important fixes and future updates. You can download the plugin build here: Kotlin Multiplatform. Note that there are three separate downloads for IntelliJ IDEA Community, IntelliJ IDEA Ultimate, and Android Studio – make sure you get the correct one. You can download an archive and install it following these instructions. Installing directly from the Marketplace is not supported for dev builds, but once the plugin is available in the stable channel, you will be able to install it from the Marketplace within the IDE. If you are using Android Studio, you need to explicitly enable K2 mode. To do this, go to Settings | Languages & Frameworks | Kotlin and select the 'Enable K2 mode' checkbox. Also, the Compose Multiplatform IDE Support plugin needs to be uninstalled first. If you encounter any issues, please report them via our YouTrack.
kodee electrified 5
kodee happy 8
K 23
j
Does the new Kotlin Multiplatform plugin replace Compose Multiplatform IDE Support or will we need to reinstall after successfully installing KMP pluging?
i
Good point. Yes, the new Kotlin Multiplatform plugin effectively incorporates all functionality from Compose Multiplatform IDE support. You don't need to reinstall it back
👍🏿 1
👍 4
l
What's new in this version? Is there a release notes document?
👍 1
☝️ 1
s
Idk if it’s me but the previews in commonMain are super fast now
c
installed into android studio canary and pre flight checks caught an issue. WOO!
didn't know k2 mode was required. just enabled it. hopefully will have a good time with this plugin update and CMP dev!
a
> What's new in this version? Is there a release notes document? The docs are going to be updated closer to the public Marketplace release, but here are the quick highlights (some of which are already noted in the thread): • KMP wizard in IDEA (the existing one in Android Studio was updated and improved) • Preflight checks on project import in the IDE (kdoctor was embedded in the plugin and improved on). • Automatically generated run configurations for iOS, Android, desktop, and web ◦ With device selectors for iOS net to run configuration dropdown on the toolbar (in the previous version you needed to change the device in run configuration settings). • Cross-language support for Swift: navigation, debugging, quick docs •
@Preview
working in common code (you need an Android target for that) • Compose Hot Reload supported (gutter icons to launch a desktop app with it) ◦ You still need to apply the Gradle plugin manually as the project README describes.
👍 3
🚀 5
K 5
o
@Preview
working in common code (you need an Android target for that)
Would it support
@PreviewLightDark
and stuff like that? Or just dark/light mode through
uiMode
?
🚫 1
j
I'm facing an issue when creating a module. The KMP module option isn't showing up. Android Studio: 2025.1.1 Canary 10 KMP Plugin: 0.9-251.23774-AS-55 K2 mode: Enabled
c
Can confirm the new project wizard is there. It looks like once you select it you essentially get the same/mirrored options as kmp.jetbrains.com so I'm assuming they're tied together. Nice
@João Henrique de Souza Silva i see an option for the module. but I dont even think that's part of the plugin. I think the newest AS canaries added kmp module support. i think i read that somewhere (maybe the latest adb podcast)
👍 1
ooooh. new icon for ios app configuration?
and it works in the device chooser! NO WAY! nice!
@Ilya Evtushenko do you know where the "signing and capabilities" editor is?
j
Update: it is possible to create a module at the root of the project, but if I have a featureauth and I want to create a module inside it, the option does not appear
j
I”m unable to uninstall the Compose Multiplatform in Android Studio Narwhal… I assume it’s because it is bundled. How did you guys get around this?
👀 1
c
Hm. I'm in latest AS canary and never installed that plugin in the past, but I can see in market place that it shows as not installed
z
The bundled Compose Multiplatform plugin is fine, that should be there. It's Compose Multiplatform IDE Support specifically that you need to uninstall.
👍 1
👍🏿 1
a
do you know where the "signing and capabilities" editor is? (edited)
@Colton Idle the notification talks about the Xcode GUI (maybe we can make it clearer), in IDEA you can do File | Open Project in Xcode and get into it.
c
Ah okay. So there's no way to set that in IDEA/AS then. darn.
a
I understand your disappointment 🙂 you can edit the Config.xcconfig file directly in IDEA, but I honestly don't know how reliable that option is.
c
okay. well thats definitely an option. let me see if I can find the right spot to edit
interesting... heres a Config.xcconfig of an app that launches properly from AS
Copy code
TEAM_ID=
BUNDLE_ID=com.rollertoaster.myApp
APP_NAME=RollerToaster
and the new one I just generated (via the new kmp wizard) is
Copy code
TEAM_ID=

PRODUCT_NAME=MyApplicationKMPTest
PRODUCT_BUNDLE_IDENTIFIER=com.example.myapplicationkmptest.MyApplicationKMPTest$(TEAM_ID)

CURRENT_PROJECT_VERSION=1
MARKETING_VERSION=1.0
Yet the new one I generated (the one directly above ^) gets the error.
a
Oh, first of all I'm wrong and you can set some Xcode stuff in the run configuration options in IDEA, including the team ID (you do need to log in in Xcode for the list of teams to be populated):
c
oh heck yeah! the less I need to open xcode... the better
😁 1
a
Second, the Team ID should only be necessary to launch on a physical device. There was a "missing bundle ID" bug, which I'm not sure is fixed in the current dev build of the plugin. But I defer to @Ilya Evtushenko on that.
c
Definitely seems like the error message could be updated then just to nudge users to either check in Configuration > Options > Development team or in Xcode > Signing, etc.
💯 2
Cool. yeah i never launch on sims/emulator anymore lately as my machine slows down too much (although im sure sims aren't too heavy probably vs emus)
a
Makes sense. Yeah, launching on a physical iPhone requires jumping through a couple more hoops, and Team ID is one of them.
c
yeah. i just know when i was doing flutter development (way back when) there was something magical about being able to launch to my iphone without opening xcode and just wanted to see if the same was possible here (which it does seem to be possible) so thats great. 🎉 thank you!
kodee loving 1
a
@Ilya Evtushenko, it's only for IOS, isn't it? Is there a version for Linux as well, that supports the
@Preview
annotation?
d
Preview works great. However seems PreviewParameter is yet not supported.
z
We're working on Preview parameter support, you can follow this issue about it. The fixes are already prepared but it'll take a bit of time for them to make it into releases.
❤️ 1
a
@zsmb, the above released version is for mac only, right?
😔 1
z
That's correct, the new plugin is macOS-only for now. Lots of its features are only possible on macOS to begin with (things like running and debugging on iOS), but we are planning to bring what we can to other operating systems too, in later releases. In the meantime, on non-macOS machines, you already get a very capable setup in IntelliJ IDEA or Android Studio for KMP development with this set of plugins providing various features: • AndroidAndroid Design ToolsJetpack ComposeNative Debugging Support
thank you color 1
d
I hope these stars and reviews to improve soon, thanks for working on improving the user experience with KMP.
z
We'd definitely appreciate fresh reviews once the plugin is out in the stable channel. Lots of previous complaints were about things like K2 or IntelliJ IDEA support, so with those addressed, we hope for better ratings this time 🙂
👍 2
f
How to use cocoapods with new plugin and wizard?I'm getting this error when I try to add cocoapods in the new wizard project:
Copy code
Multiple commands produce '/Users/x/Library/Caches/Google/AndroidStudio2025.1.1/DerivedData/iosApp-dexojzwzkxtymtbvfbhwmmpwziwd/Build/Products/Debug-iphonesimulator/.app'
This is my code in build.gradle which build success in old wizard project:
Copy code
cocoapods {
    summary = "Some description for the Shared Module"
    homepage = "Link to the Shared Module homepage"
    version = "1.0"
    ios.deploymentTarget = "13.0"
    podfile = project.file("../iosApp/Podfile")
    framework {
        baseName = "ComposeApp"
        isStatic = true
    }
}
z
@FlowFan (and everyone) I recommend starting a new thread in the channel for specific issues that might need discussion. If you have a project that reproduces the problem, opening an issue on YouTrack would also be great. If it's related to the new KMP plugin / KMP IDE tooling: https://youtrack.jetbrains.com/newIssue?project=KMT For general issues: https://youtrack.jetbrains.com/newIssue?project=KT
j
I found an issue with the Xcode preflight check. I often find I need to reinstall an older version of Xcode, especially if I need to revert to an older Kotlin version that doesn't support the latest. I usually do this by downloading the older version and renaming it, e.g. Xcode 16.2, before moving it to the Applications folder, so it can be installed alongside the latest Xcode version. Then I switch the location of the command line tools in Xcode settings to the older version for Kotlin to use. I just did this with Xcode 16.3 installed and reinstalling Xcode 16.2 to test Kotlin 2.1.20 vs 2.1.21 (16.3 is only supported by 2.1.21). I found that the preflight check only detects the required 18.2 simulator runtime if Xcode 16.2 is named "Xcode" in the Applications folder and not if its Xcode 16.3 named "Xcode". The preflight checks should use the version that's set to the command line tools rather than depending on the name of the application being "Xcode".
z
j
Thanks! I just created an issue as well. I'll copy the detailed steps to reproduce.
I'm also finding that when switching Xcode versions, IntelliJ will prompt to restart because the Xcode version changed, even though it was changed before IntelliJ started. Then after restarting, it will show this prompt again a short while later. It seems to be happy after the second restart.
z
The "version changed" issue is probably this one, if you have a reproducer for that, please add it in the comments