A sample project showing how to use a Ktor client in a multiplatform application.
To build and run the Android application, you need to specify the Android SDK location by either:
- Setting the
ANDROID_HOMEenvironment variable to your Android SDK path, or - Creating a
local.propertiesfile in the project root withsdk.dir=/path/to/android/sdk
An application works on the following platforms: Android, iOS, JavaScript, and macosArm64. To run the application, open it in IntelliJ IDEA and do one of the following:
-
To run the Android application, use the
client-mpp.androidApprun configuration created by IntelliJ IDEA automatically. -
To run the iOS application, open the iosApp directory in Xcode and run it.
-
To run the JavaScript application, execute the following command in a project's root directory:
./gradlew :jsApp:jsBrowserDevelopmentRun -
To run
macosArm64, execute the following command in a project's root directory:./gradlew :desktopApp:runDebugExecutableDesktop