Need help with xcode-kotlin?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

550 Stars 28 Forks Apache License 2.0 94 Commits 12 Opened issues


Kotlin Native Xcode Plugin

Services available


Need anything else?

Contributors list

Kotlin Native Xcode Support

Plugin to facilitate debugging iOS applications using Kotlin Native in Xcode. Defines Kotlin files as source code, with basic highlighting. Allows you to set breakpoints and includes llvm support to view data in the debug window. Xcode does not officially support custom language definitions, but they also don't explicitly block them.

Touchlab's Hiring!

We're looking for a Mobile Developer, with Android/Kotlin experience, who is eager to dive into Kotlin Multiplatform Mobile (KMM) development. Come join the remote-first team putting KMM in production. More info here.


There are 2 parts to Kotlin support: 1) debugging support and 2) language color and style formatting.

You need to tell Xcode that

files are source files, and run an lldb formatter script when debugging starts. Advanced users may want to do this manually, but if you have Xcode installed in the default place, you can run the setup script.

Unless you're using Xcode 11 (in which case look here for help), the following script will install both debugging and formatting support:



If properly set up, you should be able to add Kotlin source to Xcode, set up breakpoints, and step through code. To add Kotlin source to Xcode, follow these steps:

  1. Add a New Group to the Xcode project.
  2. Add Files to the newly created group (Kotlin Debug in this instance).
  3. Select the folders in the Kotlin library that are directly relevant to the iOS build, which will usually be
    . Make sure "Copy items into destination group's folder (if needed)" is unchecked.

When you're done, your Xcode project structure should look something like this:


The project used as an example above is KaMPKit. Check it out if you want to see a project that already includes Kotlin file references in Xcode. It's an excellent template for Kotlin multiplatform mobile projects.


Setting up the Plugin has been an amalgam of various source projects, as Xcode "Plugins" are undocumented. The most significant piece, the language color file came from other color files shipped with Xcode. Xcode plugin file from GraphQL

LLDB formatting originally comes from the Kotlin/Native project, source, although the way data is grabbed has been heavily modified to better support an interactive debugger.

Possible Future Stuff

Check out the Discussions.

Xcode Updates

Every time Xcode is updated we need the UUID. It needs to be added to

. To find the UUID of your version of Xcode, run the following:
defaults read /Applications/ DVTPlugInCompatibilityUUID

Info from here

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.