https://kotlinlang.org
Join Slack
Hi, wondering if multi-module KMM module could be configured in a project. I’ve been trying to separ...
a

Archie

almost 3 years ago
Hi, wondering if multi-module KMM module could be configured in a project. I’ve been trying to separate our common module out to smaller modules to no success. If I move out modules, some modules will have its own
cocoapods
intergration but the problem is I do not know how to integrate them back to a single
common
module without an issue. Just wondering if anyone has tried this out? Is it even possible at the moment? Would really appreciate any tips. Thanks in advance
a
a
+2
  • 4
  • 44
  • 876
What are the main advantages of Kodein over Koin in context of multiplatform project? What made you ...
e

electrolobzik

almost 2 years ago
What are the main advantages of Kodein over Koin in context of multiplatform project? What made you choose it over Koin?
e
r
+2
  • 4
  • 36
  • 875
I have a Compose Text that I want to update every second, because it shows a remaining time. Is the ...
t

Travis Griggs

over 2 years ago
I have a Compose Text that I want to update every second, because it shows a remaining time. Is the following the right/idiomatic way to express that?
var remaining by remember { mutableStateOf(keyInfo.remaining) }
LaunchedEffect(remaining) {
   delay(1.seconds)
   remaining = keyInfo.remaining
}
SettingsLabel(text = remaining.clockPrinted())
t
e
+2
  • 4
  • 10
  • 874
How do you guys work with LocalDateTime and all its siblings on the Native side? I have models in my...
k

kalpeshp0310

almost 3 years ago
How do you guys work with LocalDateTime and all its siblings on the Native side? I have models in my multiplatform app’s common code, with fields with LocalDate type. It’s a pain to create an instance of
Kotlinx_datetimeLocalDate
from Swift, and iOS developers do not feel comfortable working with it.
k
d
  • 2
  • 5
  • 874
Hi, I'm using moshi+retrofit and trying to sort out proguard setup I have a class: ```data class Pi...
p

Philip Dukhov

about 3 years ago
Hi, I'm using moshi+retrofit and trying to sort out proguard setup I have a class:
data class PingResponse(
    @Json(name = "needs_update") val shouldUpdate: Boolean,
)
And it works fine in debug, but with release minification it crashes with the following:
IllegalArgumentException: No property for required constructor parameter #0 shouldUpdate of fun `<init>`(kotlin.Boolean): not.minimized.package.PingResponse
It works fine if I apply
@JsonClass(generateAdapter = true)
to class. As per documentation it sounds like I only need to apply
@JsonClass(generateAdapter = false)
to enums, and the rest should work out of the box. I find it very tricky that it works in debug without this annotation but fails in release. This comment suggests not minimizing all the models, but I don't find it much useful in my case, as I don't store all the models in one package. I can apply
@JsonClass(generateAdapter = true)
to all my models, the biggest issue is that if I forget to do that I won't know there's a problem until I run release version. Am I missing some other way to set it up, or is there a way to make app crash in debug(or build time check?), same as it does in release, in case when model has no
JsonClass
annotation?
p
z
e
  • 3
  • 5
  • 874
In a KMP Compose Multiplatform app, I'm starting Koin with `KoinApplication(application = { ...` as ...
j

Jeff Lockhart

almost 2 years ago
In a KMP Compose Multiplatform app, I'm starting Koin with
KoinApplication(application = { ...
as described here. But the Android app sometimes crashes with:
org.koin.core.error.KoinAppAlreadyStartedException: Trying to run new Koin Application whereas Koin is already started. Use 'KoinContext()' instead of check for any 'startKoin' usage.
I'm assuming this happens when the Activity is recreated, as this is where the composable
App
is launched and where the stack trace stems from. Shouldn't
KoinApplication
expect this behavior of Activity recreation on Android?
j
n
+2
  • 4
  • 9
  • 872
Hi, we have implemented a widget with Glance that uses `actionRunCalback` with an action that uses ...
o

Odin

over 3 years ago
Hi, we have implemented a widget with Glance that uses
actionRunCalback
with an action that uses a deeplink to open the app. We're doing this because our Glance widget is in a different module than our
MainActivity
and then to avoid
CircularDependencyException
. However, we're seeing a rather strange error from Crashlytics saying
java.lang.IllegalArgumentException: List adapter activity trampoline invoked without specifying target intent.
. I saw that there was a check in
ActionTrampoline.kt
that could throw this. Has anyone else seen this before? 😄 Stacktrace in thread 🧵
o
p
  • 2
  • 5
  • 872
Anyone having issues declaring `coreLibraryDesugaring` inside `androidMain` dependencies? It seems t...
l

leandro

about 5 years ago
Anyone having issues declaring
coreLibraryDesugaring
inside
androidMain
dependencies? It seems that this function does not exist for the
multiplatform
plugin
l
j
p
  • 3
  • 11
  • 871
How are we supposed to use the new Clipboard APIs in Compose 1.8? I feel somewhat dumb but I can't r...
s

Skaldebane

9 months ago
How are we supposed to use the new Clipboard APIs in Compose 1.8? I feel somewhat dumb but I can't really figure it out. There's a single clear function to use:
Clipboard.setClipEntry
, but I can't figure out how to create a
ClipEntry
, I get
Expected class 'expect class ClipEntry : Any' does not have default constructor.
, and there seems to be no factory or companion functions to use (at least not from
commonMain
). My usage with the deprecated APIs was this:
clipboard.setText(AnnotatedString(text))
, any help would be appreciated.
plus one 4
s
k
  • 2
  • 3
  • 867
Hi guys, is there a multiplatform library for a KMP app for push notifications for iOS and Android? ...
b

Bob Kuhl

about 2 years ago
Hi guys, is there a multiplatform library for a KMP app for push notifications for iOS and Android? Something that has both common code and the platform specific code all in one?
b
j
  • 2
  • 2
  • 867
Previous585960Next

kotlinlang

A modern programming language that makes developers happier.

Powered by