84 questions
0
votes
0
answers
31
views
Koin VM/navigation on Kotlin Multiplatform - singleton viewmodel becoming unable to launch coroutine after popBackStack
Maybe I'm doing something wrong but this seems very strange to me took me a while to track down the cause but basically ViewModels are getting corrupted whenusing popBackStack or swipe left, vm's are ...
0
votes
1
answer
57
views
Kmp ios stripe integration
I have a kmp app I was able to add stripe in Android app but iOS side not working in any way. I tried adding stripe using swift package manager and also tried the StripeBridge way but nothing is ...
0
votes
0
answers
49
views
Using Clerk in Kotlin Multiplatform (KMP)
I'm trying to implement Clerk authentication in my Android Kotlin Multiplatform project following the official Clerk Android Quickstart Guide, but the SDK artifact referenced in the documentation ...
0
votes
0
answers
38
views
TaskExecutionException in building Desktop KMP application with KCEF for WebViewKMP in future
I do it like this in main.kt:
val bundleLocation = System.getProperty("compose.application.resources.dir")?.let { File(it) } ?: File(".")
LaunchedEffect(Unit) {
try ...
0
votes
1
answer
123
views
Kotlin arrow optics ksp plugin inside KMP project
Im trying to get the ksp plugin for arrow optics up and running in a KMP project.
I stared by only including the ksp plugin in the Android build file:
plugins {
// ...
alias(libs.plugins.ksp)
}...
1
vote
0
answers
159
views
Layout issues opening keyboard
I'm developing a typical chat screen, with the text input at the bottom. The app has a bottom bar with tabs and a topbar.
I'm struggling at getting what I understand to be the expected behavior (...
0
votes
0
answers
72
views
How to add space between text input and top of keyboard
My screen has an input field at the bottom. When opening the keyboard (Android, iOS), it pushes the input to the top so it stays above the keyboard. The baseline of the input is above the keyboard.
...
5
votes
3
answers
358
views
Can not use kotlinx-datetime:0.7.1 library with rememberDatePickerState() function of material3
Material3 rememberDatePickerState() crashing in desktop and iOS platforms.
I am using kotlin = "2.2.10" version for my Kotlin Compose Multiplatform (KMP/CMP) project. It runs fine on android ...
0
votes
0
answers
80
views
Kotlin Multiplatform: slow iOS debugging in Android Studio?
I’ve been experimenting with debugging the iOS side of a Kotlin Multiplatform project directly in Android Studio. Overall, it works — I can set breakpoints in shared Kotlin code, step through logic, ...
0
votes
0
answers
51
views
Font is not generated in Kotlin multiplartform project
I am trying to create a multimodule KMP project. I have created a module name theme. Inside that I want to define my color, typography and all theme releted code. Now I have created a directory named ...
3
votes
1
answer
116
views
How to bundle an additional JAR file (updater) into a Compose for Desktop installer?
Problem Description:
I'm developing a Kotlin Multiplatform application with Compose for Desktop and want to implement an auto-updater. My architecture consists of two parts:
The main application (...
2
votes
0
answers
63
views
Kotlin Multiplatform: import shared in Xcode suddenly shows empty module
I'm working on a Kotlin Multiplatform project using the typical structure (shared, androidApp, iosApp). Everything was working fine until recently — I could import the shared module in Swift (import ...
2
votes
1
answer
219
views
Setting up cocoapods on kmp (kotlin multiplatform) project in separate gradle file
Im trying to setup cocoapods in kmp project on android studio in separate cocoapods.gradle.kts file to be able to exclude it if platform is windows and run it if its mac.
In my build.gradle.kts:
if (...
0
votes
0
answers
58
views
How to access classes, methods and send parameters from native iOS to the KMP app?
When I start the iOS app, I want to send parameters from Firebase to my KMP project.
I put annotations in the KMP Kotlin class so that it would be visible, the bridge class that is generated in ...
0
votes
1
answer
102
views
How to override language to get localised string for a specific language in Kotlin Multiplatform project?
I have 2 language support in my app. Language files are arranged like below:
composeApp/src/commonMain/composeResources/values/lang.xml
composeApp/src/commonMain/composeResources/values-bn/lang.xml
...
2
votes
1
answer
54
views
Why are my external fonts not loading in an .htm file?
I'm trying to make documentation for a mobile keyboard for toki pona, and I'm going to be sharing the file around in a Keyman keyboard package. For one reason or another, files in the package can't be ...
0
votes
0
answers
42
views
how to take full screenshot in KMP Compose. actual iOS
package goodeva.smartsafety.opa.kmp.presentation.feature.upload
import platform.UIKit.*
import platform.Foundation.*
import platform.CoreGraphics.*
import kotlinx.cinterop.*
actual class ...
1
vote
1
answer
246
views
How to get screen width in KMP(IOS and Android)?
I am building a KMP project, and I need to calculate the screen width and display data accordingly.
How can I get the width in DP?
The current implementation does not give the correct width.
Common-
...
1
vote
0
answers
137
views
SwiftKlib plugin fails: cinterop... .klib does not exist – how to resolve?
I'm using the SwiftKlib Gradle Plugin in my Kotlin Multiplatform Mobile (KMM) project to call Swift code from Kotlin/Native.
When i click sync i get errors like this:
Failed to generate cinterop for :...
0
votes
0
answers
105
views
Ktor server with KMP Frontend, cookie not sent
I'm implementing a simple project using Ktor backend server and KMP Wasm.
I am implementing the Google login feature.
Google login was successful and saved the session information after authentication....
0
votes
0
answers
53
views
Voyager - How to hide bottom bar on detail screen and preserve tab state?
I'm using Voyager for bottom tab navigation in my Jetpack Compose app. I have four tabs: Home, Appointment, Prescription, and Profile, each defined using TabNavigator.
Inside each tab, I want to ...
0
votes
0
answers
74
views
Why my kmp desktop application works only from terminal, not from launchpad?
I'm creating a kotlin multiplaform project with compose-desktop support. For macOS desktop, I can run it using ./gradlew runDistributable, and I can run ./gradlew packageDmg and install it into my ...
4
votes
2
answers
691
views
Undefined symbols for architecture arm64: "_kfun:androidx.lifecycle.viewmodel.compose
I'm facing an issue when building the iOS app for KMP
Undefined symbols for architecture arm64: "_kfun:androidx.lifecycle.viewmodel.compose#...
0
votes
1
answer
210
views
how to get ios device screen size in a kmp project
I'm an android developer in my kmp project I need the screen size :
expect object ScreenSize {
val heightDp: Float
}
in android platform i implemented it like this :
actual object ScreenSize {
...
0
votes
0
answers
69
views
AWS Cognito User Pool save Google user from mobile
I'm doing KMP project with AWS Cognito without libraries and I want to add Google sign in.
I added Google in Federated identity provider sign-in and when I test it on webpage Cognito provides, it ...
0
votes
1
answer
43
views
Ktor changed value Double to scientific notation in KMP
Performing a deserialization of a response from a restful service we get back a decimal data where we try to receive it as a Double, however when operating it, it remains as scientific notation for ...
1
vote
1
answer
63
views
passing context to android platform in kmp project
in my kmp project i want to implement a reminder in android and ios platform .
interface ReminderScheduler {
fun scheduleReminder(reminder: Reminder)
fun cancelReminder(id: String)
}
expect ...
0
votes
1
answer
187
views
Launch Multiplatform iOS App by Custom URL with Parameters
In kotlin multiplatform with IOS, I am trying to start the app via a link and some parameters:
iosstaging://open?userId=1234
That part works fine. Upon entering the link into safari, the browser asks ...
0
votes
1
answer
102
views
Kotlin Multi platform Long Decimal Decoding fails
Kotlin Multi platform - Decoding fails - with Double with more decimals
{
"Test": [0.1, 0.01, 0.001, 0.0001, 0.0001]
}
Note: The challenge is not in Kotlin alone. The change is with Kotlin ...
0
votes
0
answers
17
views
Can we access .npy files in kotlin multiplatform iOS module?
I am working on a kotlin multiplatform project targeting iOS & Android, and using this amazing library Multik.
implementation "org.jetbrains.kotlinx:multik-core:0.2.3"
implementation &...
0
votes
0
answers
86
views
How to migrate a SQLDelight DB in a KMP app using code migration?
The documentation on the Code Migration section states how to perform such migration but it doesn't say where do you put this code, or if there's something else to do to make it work.
3
votes
1
answer
640
views
CocoaPods executable not found in your PATH
KMP project. I've uninstalled ruby and reinstalled using brew and rbenv. kdoctor shows all check marks
ruby 3.4.2
ruby gems 3.6.3
cocoa pods 1.16.2
When I open my project in Xcode I get the following ...
1
vote
1
answer
200
views
Compose Multiplatform: java.lang.IllegalStateException: Could not load font in multi-module project
I’m working on a multi-module Compose Multiplatform (CMP) project and created a new CMP library module using libs.plugins.multiplatform.library.
However, when I added font resources and tried to use ...
0
votes
0
answers
62
views
Global function access repository without value-parameter: KMP Multiplatform
Multiplatform project trying to use Firebase Analytics and Crashytics. I have room setup and offer backup for the database to firebase storage. In the database I have a settings table so user setup ...
0
votes
0
answers
74
views
KMP project using shared module with maven local. Shared module not found
I'm starting a KMP project using native UI's (Compose and Swift UI) and want it to control the shared module version independently by platform.
The project was created with the KMP Wizard.
When some ...
2
votes
1
answer
170
views
Kotlin Multiplatform generated file lib to KMP sample app
I have a problem importing my kmp lib to my sample project.
Project
I have the following code structure :
├── app/ (KMP App module containing my samples apps)
│ ├── commonMain/
│ ├── androidMain/
│...
0
votes
0
answers
95
views
KMP: Platform directory inside shared directory
I'm pretty new to KMP and see often in sample code that there is an androidMain on the same level as commonMain and iOSMain. This is straight forward and I understand this.
BUT there are also platform ...
1
vote
1
answer
571
views
Dispatchers.Main was accessed when the platform dispatcher was absent kmp
my problem is: Dispatchers.Main was ccessed when the platform dispatcher was absent and the test deispatcher was unset. Please make sure Dispatchers.setMain() is called before accessing Dispatcher....
2
votes
1
answer
145
views
Knuth Morris Pratt Algorithm
Given a string of DNA characters (accepted characters: A, C, G, T) and a disease, with gene x (consider a pattern P to be found) also using the same alphabet.
The task is to search the DNA strand ...
0
votes
0
answers
115
views
How to refresh image in Coil 3 without modifying the URL or relying on context in KMP?
I am working on a Kotlin Multiplatform Project (android and desktop(windows)) that uses Coil 3 for loading images in a Jetpack Compose UI. My goal is to refresh an image when the user clicks a refresh ...
1
vote
2
answers
693
views
CMP/KMP iOS build failed with "No matching variant of androidx.compose.foundation:foundation:1.7.0.."
I have composed a multiplatform project with Android and iOS. The Android app runs and installs successfully, but when I run the iOS app from XCode build, it fails with the below error.
🛑 No ...
3
votes
2
answers
259
views
Running InstrumentedAndroidTest in KMP project
I need some help please,
I want to do some tests using Instrumented in Android (I need to get the appContext, to get the directory to create my test db).
But I was having the error: No instrumentation ...
0
votes
0
answers
89
views
How can i upload image to firebase storage from compose multiplatform Uri? and why i can't use await?
protected suspend fun uploadProfileImage(userId: String, imageUri: Uri): String {
val fileRef = storage.reference.child("profile_images/$userId.jpg")
fileRef.putFile(imageUri).await()...
0
votes
0
answers
77
views
Fleet IDE unable to run iOS app with CocoaPods plugin (ld: framework 'Pods_iosApp' not found)
I just use standard setup from Kotlin Multiplatform Wizard and manually setup CocoaPods plugin.
here is my configuration:
libs.versions.toml
[versions]
agp = "8.5.2"
android-compileSdk = &...
0
votes
0
answers
105
views
Get the point of user clicked on the MKMapView kotlin multiplatform
I have started a new project with KMM(Kotlin multiplatform).
I need to use the original IOS map (MKMapView) in my project.
According to the instructions of this article
integrating-mapkit-in-compose-...
2
votes
0
answers
87
views
Does Kotlin Multiplatform not have scrollbars?
How do I insert simple scrollbars in my Kotlin Multiplatform app?
I'm supporting Android, iOS, Windows (JVM) and Mac (JVM).
Researching this topic, I found there is a Jetpack component, but it's ...
0
votes
0
answers
445
views
How to implement Google authenticate with Firebase using Compose Multiplatform
I tried to implement the Google authentication with Firebase in Compose Multiplatform framework using Kotlin in mobile engineering, but I didn't find the way to build it for iOS. I composed the Google ...
0
votes
0
answers
36
views
When I use KMP to generate templates online, the kmp why can not create xcode-framework,but it is fat-framework
the android app can run successfully.
and the gradle add the
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach { iosTarget ->
iosTarget.binaries.framework {
...
1
vote
0
answers
115
views
How to use KMP project as Module in Android Project
I have created a separate KMP project using KMP Wizard and I am using native UI for both platform(Android and iOS) in respective folders, Maintaining the business logics in shared Folder with clean ...
0
votes
0
answers
94
views
Use Android XML resources in actual declaration
I am implementing an Emoji picker on Kotlin Multiplatform with Compose Multiplatform. Since there is no multiplatform for androidx.emoji2:emojipicker, I implement this Composable using and expected ...