Ola Adolfsson
09/03/2020, 6:24 PMAlberto
09/03/2020, 7:19 PMVinod Rai
09/04/2020, 8:49 AMChristian Sousa
09/04/2020, 9:17 AMUITableView
class, extending both `UITableViewDataSourceProtocol`and UITableViewDelegateProtocol
, and when overriding methods, I get the following error when running (compiling does not produce any error):
/Users/teamcity1/teamcity_work/4d622a065c544371/runtime/src/main/cpp/ObjCInterop.cpp:137: runtime assert: Unable to add method to Objective-C class
I’m not really sure what’s causing the error, I only needed to extend the Delegate for the following method:
@Suppress("CONFLICTING_OVERLOADS")
override fun tableView(tableView: UITableView, viewForHeaderInSection: NSInteger): UIView? {
return UIView()
}
Does anyone knows what I could do?
EDIT: Even if I remove the override, the compiler will tell me that: must override public open external fun debugDescription(): String?
But when I override it, I get the same error.. (edited)
(already tried asking on native channel but got no answer)4ntoine
09/04/2020, 10:48 AMactual
impls using fopen(), ...
in the native
sourceSet. Any existing/proper way of doing that? PS. https://github.com/orangy/kotlinx-files seems to be discontinuedSlackbot
09/04/2020, 2:26 PMYevgeni Liskovich
09/04/2020, 2:30 PMYevgeni Liskovich
09/04/2020, 2:38 PMmanueldidonna
09/04/2020, 9:49 PMDaniele B
09/04/2020, 10:52 PMHadi Lashkari
09/07/2020, 9:33 AMkotlin.mpp.enableGranularSourceSetsMetadata=true
in gradle.properties
as you can find in https://kotlinlang.org/docs/reference/mpp-share-on-platforms.html#share-code-on-similar-platforms, but as a side effect, android source set is not included in the publication! How can I publish for android then? My project is https://github.com/hadilq/log4k/ if it helps. Thanksnatario1
09/07/2020, 11:04 AMplatform.*
imports are red, but code compiles just fine. And the error stays after a clean build / invalidating the cacheMaurice Jouvet
09/08/2020, 11:50 AMError Domain=KotlinException Code=0 "Could not create instance for [Single:'com.poc.app.kmm.core.interactors.login.getAuthenticationToken.GetAuthenticationTokenUseCase']"
Maurice Jouvet
09/08/2020, 11:50 AMwilliam
09/08/2020, 3:30 PMjvm()
to set a java 8 target?Ivann Ruiz
09/08/2020, 5:20 PM1.4.0
to make a very simple API call on a multiplatform mobile project, however I get Thread 1: EXC_BAD_ACCESS(code=1, ...)
error when I run the IOS code. Anybody run into this issue? It throws the error on this line in the mainIos
source set:
actual val engine by lazy { Ios.create() }
would appreciate any insight 🙂coolcat
09/08/2020, 6:06 PMkotlinx-coroutines-core-native:1.3.9
?Jake
09/08/2020, 7:10 PMUncaught Kotlin exception: kotlin.native.concurrent.FreezingException: freezing of com.ramseysolutions.proportalspike.shared.Globals.Companion@f13308 has failed, first blocker is HttpClient[io.ktor.client.engine.ios.IosClientEngine@f13488]The offending code was:
kotlin
val json = kotlinx.serialization.json.Json { ignoreUnknownKeys = true }
fun createHttpClient() = HttpClient() {
install(JsonFeature) {
serializer = KotlinxSerializer(json)
}
}
class Globals {
companion object {
client = createHttpClient()
}
}
The iOS application utilizes that client in its first view. I noticed in my debugging, that the breakpoints in my iOS project were never getting hit. So I determined the crash was happening before the class that was referencing client
was ever created. Working that theory, I was able to stop the crash from occurring and achieve the correct results on iOS and Android by removing that client
property from the companion object
and by creating a global variable in the iOS project:
// Kotlin Shared
class Globals {
client = createHttpClient()
}
// iOS
let globals = Globals()
After resolving that, I asserted that a simple global variable would fail also, and I was correct when I tested that. My questions are: what was causing the failure? Are Coroutines unavailable until a certain point in the iOS application lifecycle? And what resources or tools can I use to figure that type of thing out on my own?Logan Knight
09/08/2020, 7:21 PMPROJECT_ROOT/build/js/packages/kotlin-full-stack-application-demo-client/kotlin/kotlin-full-stack-application-demo-client.js
gets deleted during compileKotlinJs
task which causes HMR to fail out with Error: ENOENT: no such file or directory, open
. I'm trying to wrap my head around the config and it seems I need to have the task ``compileKotlinJs`` not clear the folder and just overwrite the content, but I'm not quite sure how, or if that's the correct solution.dazza5000
09/08/2020, 10:11 PMSarah-Jane Gallitz
09/09/2020, 12:09 AMNikita Khlebushkin
09/09/2020, 7:53 AMThomas Skovsgaard
09/09/2020, 1:15 PMThere is no event loop. Use runBlocking { ... } to start one.
from the iOS part, I use kotlin 1.4, coroutines 1.3.9 and my iOS dispatcher is based on this https://github.com/JetBrains/kotlinconf-app/blob/33f2d4e65f470d1444c5d4b46249af8feb243d03/common/src/iosMain/kotlin/org/jetbrains/kotlinconf/DispatcherNative.kt
I have tried using native-mt with Dispatchers.Main but this gives me another error Fatal exception in coroutines machinery for CancellableContinuation
The Android part works as expected. I have searched and tried a lot of solutions, but can't seem to figure out what's going wrong, any guidance is much appreciated 🙂Maurice Jouvet
09/10/2020, 7:38 AMUncaught Kotlin exception: kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for DispatchedContinuation[WorkerCoroutineDispatcherImpl@1364278, Continuation @ $split$lambda-0$<anonymous>_3COROUTINE$2]. Please read KDoc to 'handleFatalException' method and report this incident to maintainers
HttpClient: RESPONSE <https://app.bluekango.com/mobile/app/login> failed with exception:
kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen kotlinx.coroutines.AwaitAll.AwaitAllNode@3eeba78
I have done some research and found that there are some issues with Ktor/Coroutines, but I don't know what can I do to avoid this issue..? I tried to retrograde my version (not working with my current project) and I'am already using the specific agent engine for iOS or Android. But not working.
Link: https://github.com/ktorio/ktor/issues/1550Oleh
09/10/2020, 8:00 AMkotlin.native.concurrent.FreezingException: freezing of InvokeOnCompletion[InvokeOnCompletion@360fd08] has failed, first blocker is HttpClient[io.ktor.client.engine.ios.IosClientEngine@362a408]
freezing of InvokeOnCompletion[InvokeOnCompletion@360fd08] has failed, first blocker is HttpClient[io.ktor.client.engine.ios.IosClientEngine@362a408]
I’m running
const val kotlinVersion = "1.4.0"
const val coroutinesVersion = "1.3.9-native-mt"
const val ktorVersion = "1.4.0"
const val serializationVersion = "1.0.0-RC"
Anyone can help?Nicolas Bourdin
09/10/2020, 10:05 AMobject MyObject {
val property: String = ""
}
In swift, I can call this singleton like this MyObject().property
, it will not recreate a new instance of MyObject each time?Daniel Rampelt
09/10/2020, 8:01 PMFAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':tasks'.
> Could not create task ':shared:podInstall'.
> Task with name 'podspec' not found in project ':shared:api'.
Hailong
09/11/2020, 8:22 AMhallvard
09/11/2020, 9:00 AMlouiscad
09/11/2020, 1:13 PMkotlin.mpp.enableCompatibilityMetadataVariant=true
What does it do exactly?
I'm interested because I'm in the process of testing publishing and consumption of multiplatform libraries (Android, native, JS and JVM).