JetBrains Fleet 1.34 Help

Kotlin Multiplatform

JetBrains Fleet supports development of Kotlin Multiplatform Projects, featuring cross-language code intelligence features, navigation, debugging, refactoring, and more. For iOS development, it provides full Swift support to assist you in working with native app components.

Prerequisites

To run and debug Android applications, you will additionally need to create a Virtual Device within Android Studio.

If you experience problems running an iOS project, on either Simulator or Device, please verify that you can run the embedded project (in the iosApp folder) from Xcode, then restart JetBrains Fleet.

Create a multiplatform project

To create a new multiplatform project, use the online new project wizard.

  1. Open https://kmp.jetbrains.com in your browser.

  2. Indicate the platforms that you want to target

  3. Press the Download button, then unpack the ZIP.

Running the project

After you turn the Smart mode on, JetBrains Fleet will automatically detect run configurations for the appropriate targets.

You can run them through the Run & Debug dialog.

Run your project on a specific device

  1. When opening a project, JetBrains Fleet creates run configurations for the targets found in the build file. To access run configurations, you can:

    • Use the ⌘ R shortcut.

    • Select Run | Run & Debug in the main menu.

    • Click the Run configurations icon at the top of the window.

  2. From the Run destination drop-down list, select the necessary device. For more information about the device chooser, refer to Selecting a device to execute the configuration.

    Run configurations

For example, if you select the iosApp configuration from the list and run it. The application will automatically be executed on the iPhone simulator.

The build window displays how the application was compiled and launched.

Run the iOS app on the iPhone simulator

Selecting a device to execute the configuration

  • You can select a device that the configuration should use to run your code. The device chooser is available in the following controls:

    • in the Run & Debug list. To open the Run & Debug list, press ⌘ R or click Run Run configurations.

      list of run configurations
    • in the Run & Debug list, click the ellipsis icon.

      the ellipsis icon
    • in test files in the gutter near the corresponding code.

      test files in the gutter

Using Logcat for Android applications

Logcat is a command-line utility that captures a log of system messages, including those generated by your application using the Log class.

Viewing the Logcat log

To view the Logcat log while your Android application runs:

  • Click on the Click here to open your Logcat link at the end of the build log in the application running tab.

Filtering the log

  • You can filter your Logcat log by using the following options:

    • The Minimum Log Level drop-down list: in the Logcat tab, select the desired minimum error logging level from the Minimum Log Level drop-down list.

      Minimum Log Level
    • The Filter log search field: in the Logcat tab, click the Filter log search field and type your search request to filter log results.

      Filter log

Kotlin Multiplatform Documentation

For more information on developing Kotlin multiplatform applications, refer to Kotlin Multiplatform documentation.

Last modified: 22 March 2024