Questions tagged [kmm]

For questions related to Kotlin Multiplatform Mobile, also known as KMM. It is an SDK for iOS and Android app development. Not to be confused with Kotlin Multiplatform which is abbreviated as KMP. KMM is an subset of KMP.

118 questions
1
vote
2 answers

Trying to share com.apollographql.apollo3 between my kmm gradle files

Working on an Android project that has a lot of KMM modules, so I've tough I would extract a common gradle file and simply use it from the project specific gradle files. My common gradle file is shared-library.gradle.kts package commons import…
Calin
  • 6,661
  • 7
  • 49
  • 80
1
vote
0 answers

How to print properties of kotlin objects in Xcode console?

I'd like to use Xcode console to print values of properties of Kotlin objects.
Victor Kushnerov
  • 3,706
  • 27
  • 56
1
vote
1 answer

Enable Compose Compiler in KMM Module

I'm working on a KMM project and ran into this article while working on improving performance https://www.jetpackcompose.app/articles/how-can-I-debug-recompositions-in-jetpack-compose My shared KMM module has a lot of data classes that are used in…
Alchitry
  • 1,369
  • 1
  • 16
  • 29
1
vote
1 answer

How to check whether a particular url path is a directory or not in KMM ios implementation?

I want to covert the corresponding swift method into kotlin for kmm func checkIfDirectoryExist(fileURL: URL) -> Bool { var isDir: ObjCBool = false if FileManager.default.fileExists(atPath: fileURL.path, isDirectory: &isDir) { …
1
vote
1 answer

KMM - Unresolved reference: platform for IOS application

Hellow. I have a trouble with template KMM application. It got an error after I created new KMM application - in shared IOS app module it cannot find package platform. It's on kotlin. Adroid app works well. Need to say, that I works on window by…
1
vote
1 answer

Adding kotlinx-datetime to my Kotlin Multiplatform app breaks iOS build

I was able to successfully run the sample app generated by Android Studio in both Android and iOS. I chose CocoaPods during the Wizard steps. But when I add kotlinx-datetime to my dependencies, I can only run the app for Android. My…
Renaro Santos
  • 403
  • 1
  • 7
  • 19
1
vote
1 answer

Passing Android / iOS specific arguments in Actual / Expect classes in Kotlin Mutliplatform project

So I'm trying to integrate KMM module into an already existing android app. I'm exposing a class from common KMM module into the Android project, which looks something like this (please ignore the syntax, it's written just for reference of what I'm…
kumarz
  • 45
  • 6
1
vote
0 answers

Post request a raw json with Ktor client

I want to make post request with Ktor but I get Error 400. the curl looks like this : curl --location --request POST 'https://api.jdoodle.com/execute' \ --header 'Content-Type: application/json' \ --data-raw '{ "script" :…
zzz
  • 83
  • 1
  • 9
1
vote
1 answer

Actual/Expect classes doesn't work in Kotlin Mutliplatform proyect

I was develoing an KMM App, where I try to implement a regular localDatasource and remoteDatasource, using SQLDelight and Ktor respectively. My problems comes when I try to shared the native code from AndroidApp and iosMain, into commonModule. I…
Manuel Lucas
  • 636
  • 6
  • 17
1
vote
0 answers

Certificate Pinning in ktor kmm on Android devices below android 7

After testing network_security_config file with android 28, I see the certificate pinning working when using ktor kmm (using OkHttp) However, in devices below android 7, Is there any way to setup certificate pinning. I tried these codes, but it…
Hien Nguyen
  • 744
  • 2
  • 7
  • 20
1
vote
0 answers

SQLDelight android/ios . Case insensitive select

I use SQLDelight in my kotlin multiplatform app. It works fine. But i see a problem with case insensitive select requests. It doesn't work on iOS. I used the tutorial to integrate SQLDelight in my app…
1
vote
0 answers

koltinx.parcelize.Parcelize doesn't found in kmm proyect with kotlin 1.4.20

I was deveoping an KMM proyect where I try to use @Parcelize annotation on my data class, and although I made all the change which suggest the oficial docuemntation of how to migrate from android.extensions to kotlin-parcelize, Android Studio still…
Manuel Lucas
  • 636
  • 6
  • 17
1
vote
0 answers

Ktor library with Kotlin Multiplatform project structure

I was developing an Kotlin Multiplatform App, which I use Ktor, to network calls, and SqlDelite to manage the local datasource. So I try to implement the same structure which build Android Studio when you create a KMM project. My problem is that the…
Manuel Lucas
  • 636
  • 6
  • 17
1
vote
2 answers

KMM with CocoaPods. Error: cocoapods-generate requires CocoaPods >= 1.5.0

I'm trying to add a simple CocoaPods dependency to a test kmm project as explained in this tutorial Unfortunately, I'm getting this error Executing of 'pod gen --platforms=ios…
Pavel
  • 2,610
  • 3
  • 31
  • 50
1
vote
2 answers

BuildConfig is defines multiple times in a KMM project

I am wokring on a Kotlin Multiplatform Mobile (KMM) project and was trying to generate a signed release app bundle for the Android Application and came across this error Caused by: com.android.tools.r8.internal.b: Type packageName.BuildConfig is…
S Haque
  • 6,881
  • 5
  • 29
  • 35