kotlin-multiplatform Questions

4

Hey I am working in Ktor. I found this answer to show log in specific platform iOS and Android. But when I am building this through gradle I am getting error on this when running this command on te...
Thresher asked 3/5, 2022 at 16:42

2

Solved

Using Android Studio with the Kotlin Multiplatform Mobile plugin, I have created a KMM project, which provides support for Android and iOS. However, I would also like to be able to use the same cod...
Marin asked 22/12, 2022 at 14:41

2

Solved

I am following the KMM tutorial and was able to successfully run the app on Android side. Now I would like to test the iOS part. Everything seems to be fine except the compilation error below. I su...
Bedfast asked 10/1, 2021 at 11:26

2

Solved

I am a first time on KMM and have just created a new KMM application project on Macbook M1 Pro. No code changes, this is just the hello world app. I have been able to successfully build the project...
Perseus asked 28/11, 2021 at 16:56

3

Solved

I am trying to test a Kotlin class in my common library for my Kotlin Multiplatform project in Android Studio. I have had to reconfigure the build.gradle file several times and managed to fix most ...
Granger asked 8/6, 2019 at 17:30

5

Solved

I have a KMM project and want to use SqlDelight library, but when I build the project database schema not generated and table entities also. actual class DatabaseDriverFactory(private val context: ...
Chessy asked 27/11, 2020 at 9:45

1

Solved

I setup a KMP project but I can't start the iOS Simulator. Android works perfectly. When trying to run the iOS the following gradle task fails: The /Applications/Xcode.app/Contents/Developer/Toolch...
Baeyer asked 21/9, 2023 at 13:10

4

Solved

I have written a common code in a common module as below and tested in JS environment val response = client.post<HttpResponse>(url) { body = TextContent("""{"a":1,"b":2}""", ContentType.Ap...
Deragon asked 13/2, 2019 at 21:20

4

I'm trying to build a KMM project using Android Studio. I can see two separate configurations as well, each for AndroidApp and iOSApp. But the iOSApp configuration doesn't have an Execution target....
Colton asked 26/7, 2022 at 4:57

3

Solved

I'm working on a Kotlin Multiplatform project which is an SDK providing functionality for iOS & Android applications. In our build.gradle.kts we have a couple of variables that we would like to...
Nazareth asked 9/12, 2022 at 13:44

4

Solved

I'm currently developing a simple KMM module, which needs Context in order to perform some operations. I am aware of ways to achieve that with extending Application class and making dependency inje...
Weingarten asked 19/2, 2021 at 0:2

2

I am trying to delete the fcm token from a user, and then logout. But I cant do that because I receive the error 'Calling Kotlin suspend functions from Swift/Objective-C is currently supported only...

8

I created a new KMM project and selected Cocoapods for the iOS framework distribution and as soon as it finished building it threw the following error: Executing of 'pod install' failed with code 1...
Insignificance asked 2/11, 2021 at 4:56

0

I've been playing around with Kotlin Multiplatform and Compose Multiplatform and had a question on some libraries. Does anyone know if theres any ad services such as Google Admob or anything else t...
Holbrook asked 10/8, 2023 at 18:48

4

I have a relatively large db that may take 1 to 2 minutes to initialise, is it possible to load a pre-populated db when using sqldelight (kotlin multiplatform) instead of initialising the db on app...
Arpent asked 4/8, 2019 at 8:10

0

I faced with the problem that iOs app can't get shared String resource by provided ID. Ios and kmp module are in different repositories I followed the configuration in README of the lib. https://g...
Hammerskjold asked 28/7, 2023 at 17:11

3

as Apple announced that Xcode Cloud is now available for all developers, I tried to set it up for a Kotlin Multiplatform project. The start was a little bit hard tbh. Currently I am facing followin...
Marcmarcano asked 10/6, 2022 at 18:39

9

Solved

I'm trying to fetch and deserialize some data that is being hosted on github. { "Meals": [ { "id": "1598044e-5259-11e9-8647-d663bd870b02", "name": "...
Holdup asked 2/12, 2020 at 9:12

2

I'm trying to migrate an Android Jetpack Compose project to compose multiplatform. How can we use context in the composables. val context = LocalContext.current I can't access the LocalContext

3

Solved

I am looking for a way to easily use custom fonts in a Compose Multiplatform project. I found that we need to use Font from the androidx.compose.ui.text.platform.Font package. But this object takes...
Beneath asked 17/4, 2023 at 12:31

0

I want to call a method in from CommonMain periodically even when the app is in background. I wanted to start to implement it for Android, so I tried with Workmanager. But I realised that I cannot ...
Transmarine asked 7/7, 2023 at 11:50

10

Solved

I got this on my android part of Flutter. Unsupported Java. Your build is currently configured to use Java 17.0.2 and Gradle 7.0.2. Possible solution: - Open Gradle wrapper settings, change `dis...
Vitia asked 28/1, 2022 at 8:9

1

Situation We have a project, with many modules (java and android). We have one additional module which is Kotlin Multiplatform module. We reuse code from this module with our iOS app. Our long term...
Amative asked 4/6, 2020 at 13:2

2

Solved

I have a Kotlin Multiplatform project setup with Android & cocoapods for iOS. I have a file Extensions.kt in commonMain/src with the following function: fun String.isValidEmail(): Boolean { re...
Tracytrade asked 4/2, 2020 at 4:52

4

Solved

What multiplatform Lock or synchronization approach should be used in multiplatform Kotlin code? Previously in Java code i used synchronized and i can see synchronized in Kotlin too. However it's m...

© 2022 - 2025 — McMap. All rights reserved.