Justin Brooks
11/23/2022, 3:57 PMPure Swift modules are not yet supported.I reached for SwiftSoup for a particular requirement I'm working on, but it was unusable for this reason. However, I noticed the yet in there. I searched the kotlin issue tracker for an issue I could follow for updates and didn't find one. Is this an eventual goal of the KMM and/or Kotlin/Native toolchains? Did I miss an issue? This seems like something that would benefit KMM use-cases a lot, but I'd be interested in reading about technical difficulties or progress.
Tomas Kubernat
11/24/2022, 1:40 PMKtor
and another Java Android project(library + UI application) using mentioned Kotlin library and its api. Unfortunately i can’t compile the UI application using both mentioned libraries with following message from gradle:
However we cannot choose between the following variants of io.github.pdvrieze.xmlutil:serialization:0.84.0:
- androidRuntimeElements-published
- jvmRuntimeElements-published
All of them match the consumer attributes:
Have you ever had similar problem? I can’t find any way how to solve this.An Tran
11/24/2022, 2:10 PMSean Keane
11/24/2022, 6:17 PMDon.Robertson
11/24/2022, 7:58 PMCrul
11/25/2022, 3:27 AMWorkerManager
periodically every 30 minutes in the background to execute some tasks. One of the task is downloading the image from remote server and then store the image file in the local storage. My Questions are
1. How to implement the WorkerManager
that will be triggered every 30 minutes in KMM ? (of course I hope it runs on Android and IOS)
2. How to store the image file in the local storage ? To make things even more confusing to me, currently in Android we have that thing called Scoped Storage
. I’m not sure if IOS has this kind of concept as well. How to get around with this problem ?zfan93
11/25/2022, 6:31 AMayodele
11/25/2022, 2:07 PMshared
changes for Xcode?
What I do right now run the iosApp to reflect changes in xcode (which I don't like)Josh Eldridge
11/25/2022, 7:18 PMCould not find :kotlin-native-prebuilt-macos-x86_64:1.7.21.
when trying to compile a shared module for kotlin multiplatform mobile?
I know it's part of the 1.7.21 release (because I see it here https://github.com/JetBrains/kotlin/releases) but gradle isn't finding it, maybe my repositories aren't setup right?Android75
11/26/2022, 10:22 AMAndré Thiele
11/26/2022, 12:42 PMAchinth Gurkhi
11/26/2022, 1:28 PMShabinder Singh
11/26/2022, 10:12 PMbenkuly
11/27/2022, 10:53 AMJohann Pardanaud
11/27/2022, 4:28 PMdata class SomeModel(val createdAt: Instant)
In JS and Darwin targets, do you any recommandation to provide native dates for the createdAt
property?
Details in thread ➡️ 🧵Piotr Krzemiński
11/28/2022, 9:05 AMEntry rest/lib/model-jvm.jar is a duplicate but no duplicate handling strategy has been set. Please refer to <https://docs.gradle.org/7.5.1/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy> for details.
It’s because I have two Gradle modules that are called model
, see a related thread for Kotlin/JS. Now there’s the clash also for JVM modules, but I cannot see an equivalent of moduleName
for kotlin { jvm { … } }
. Please advise!Piotr Krzemiński
11/28/2022, 9:06 AMAntonin Porta
11/28/2022, 9:28 AMval androidMain by getting {
dependencies {
implementation("androidx.room:room-runtime:$roomVersion")
implementation("androidx.room:room-ktx:$roomVersion")
implementation("androidx.room:room-common:$roomVersion")
// kapt("androidx.room:room-compiler:$roomVersion")
...
And also under the plugins block
plugins {
id("kotlin-kapt")
}
But I'm getting the error : "cannot find implementation for XDatabase" when the app is running. I have no issues compiling.
I don't really understand what is missing or misconfigured. Any help would be great thanks 🙂
PS : I'm migrating an android library to kmm and haven't moved every dependency to kmm ones like SQLDelight...Achinth Gurkhi
11/28/2022, 11:55 AMMichael Paus
11/28/2022, 5:54 PMMeherdatta Chepuri
11/28/2022, 9:13 PMeygraber
11/29/2022, 12:58 AMuntil
function for Float
in common code?Hee Fan
11/29/2022, 2:06 AMRocketLaunchRow_Previews
when I try to make a mockRocketLaunch
.
It seems the mockRocketLaunch
can not be initialised. From the crash log, I think it might be native memory model issue, however, I could not get useful information to find out the root cause. Could anyone provide more information on the crash? Thanks.
// Crash Log
1 libsystem_pthread.dylib 0x1af25a1e8 pthread_kill + 256
2 libsystem_c.dylib 0x180129e28 abort + 124
3 shared 0x106ad9924 konan::abort() + 12
4 shared 0x106ae791c (anonymous namespace)::terminateWithUnhandledException(ObjHeader*)::$_1::operator()() const + 20
5 shared 0x106ae77e0 void (anonymous namespace)::$_0::operator()<(anonymous namespace)::terminateWithUnhandledException(ObjHeader*)::$_1>((anonymous namespace)::terminateWithUnhandledException(ObjHeader*)::$_1) + 80
6 shared 0x106ae75a0 (anonymous namespace)::terminateWithUnhandledException(ObjHeader*) + 56
7 shared 0x106ae7530 (anonymous namespace)::processUnhandledException(ObjHeader*) + 100
8 shared 0x106ae93d4 kotlin::ProcessUnhandledException(ObjHeader*) + 60
9 shared 0x106aeccb4 Kotlin_ObjCExport_trapOnUndeclaredException + 36
10 shared 0x106a96e9c objc2kotlin.1298 + 424 (/<compiler-generated>:1)
11 RocketLaunchRow.1.preview-thunk.dylib 0x114f2f268 @nonobjc SharedRocketLaunch.init(flightNumber:missionName:launchDateUTC:details:launchSuccess:links:) + 220
12 RocketLaunchRow.1.preview-thunk.dylib 0x114f2dd58 SharedRocketLaunch.__allocating_init(flightNumber:missionName:launchDateUTC:details:launchSuccess:links:) + 120
13 RocketLaunchRow.1.preview-thunk.dylib 0x114f2da74 static RocketLaunchRow_Previews.__preview__previews.getter + 940 (RocketLaunchRow.swift:53)
14 iosApp 0x1049817c8 protocol witness for static PreviewProvider.previews.getter in conformance RocketLaunchRow_Previews + 12
15
Source Code
// iosApp/iosApp/RocketLaunchRow.swift
import SwiftUI
import shared
struct RocketLaunchRow: View {
var rocketLaunch: RocketLaunch
var body: some View {
HStack {
VStack(alignment: .leading, spacing: 10.0) {
Text("hello world")
}
Spacer()
}
}
}
extension RocketLaunchRow {
private var launchText: String {
if let isSuccess = rocketLaunch.launchSuccess {
return isSuccess.boolValue ? "Successful" : "Unsuccessful"
} else {
return "No data"
}
}
private var launchColor: Color {
if let isSuccess = rocketLaunch.launchSuccess {
return isSuccess.boolValue ? Color.green : Color.red
} else {
return Color.gray
}
}
}
struct RocketLaunchRow_Previews: PreviewProvider {
static var previews: some View {
let links = Links(patch: nil, article: "article")
let mockRocketLaunch = RocketLaunch(flightNumber: 1,
missionName: "Mars",
launchDateUTC: "UTC+8",
details: "Details",
launchSuccess: true,
links: links)
}
}
Mychael Koelfat
11/29/2022, 9:58 AMFunction doesn't have or inherit @Throws annotation and thus exceptions isn't propagated from Kotlin to Objective-C/Swift as NSError.
If I understand correctly, because Kotlin has no concept of checked exceptions, where Swift only has checked errors. Though I do not understand how I fix this, the documentation doesn't make that too clear for me. Does anyone know how to fix this?Raphael TEYSSANDIER
11/29/2022, 1:21 PMfatJar
with kotlin multiplatform ?Igor Milakovic
11/29/2022, 6:42 PMio.ktor:ktor-client-darwin-legacy
instead of io.ktor:ktor-client-ios
, but after making that change I can't even build the app:
** ARCHIVE FAILED **
The following build commands failed:
PhaseScriptExecution [CP-User]\ Build\ shared ~/Library/Developer/Xcode/DerivedData/iosApp-dwshccrfrznbhwgdphnxyuqdispt/Build/Intermediates.noindex/ArchiveIntermediates/My\ App/IntermediateBuildFilesPath/Pods.build/Staging-iphoneos/shared.build/Script-80ED0967EE0BBCFEB52FF26F11A47A90.sh (in target 'shared' from project 'Pods')
I'm using Kotlin 1.7.21 and Ktor 2.1.3. I've tried downgrading all the way to Kotlin 1.6.0 and Ktor 2.1.1 (the version in which it was supposedly fixed), but no luck.
Thanks in advance!Kirill Zhukov
11/29/2022, 7:35 PM> Cannot add task 'commonizeNativeDistribution' as a task with that name already exists.
Any ideas?Raphael TEYSSANDIER
11/29/2022, 8:03 PMpublic final Object connectLocal(@NotNull final Credential.LocalMode credential, @NotNull final List features, @NotNull final Function1 configuration, @NotNull Continuation $completion) {
return FlowKt.callbackFlow((Function2)(new Function2((Continuation)null) {
...
};
The last argument isn’t used, but in callbackFlow
we pass null instead of the completion. Any idea ?Hasan Nagizade
11/29/2022, 9:25 PMJohn Huang
11/29/2022, 10:35 PMJohn Huang
11/29/2022, 10:35 PMephemient
11/29/2022, 10:46 PM