nrobi
01/21/2020, 10:16 AMcocoapods
to add the dependency for my common
. However I’m getting Could not build Objective-C module 'common'
without any more information. Is there any way to find more information why is the build failing?Tristan
01/21/2020, 4:15 PMimport common // <- Not found
.
How should I proceed?Sujit
01/21/2020, 4:18 PMspierce7
01/21/2020, 8:06 PMthis
isn’t frozen, and it seems like the property shouldn’t be frozen since it’s only ever touched by one thread.
2. I’m not seeing an exception when I attempt to mutate something that’s frozen. That seems odd.
3. I’m pretty sure I was seeing different behavior a month or so back (around Kotlinconf) where the property wasn’t frozen. Am I imagining this?Joey
01/22/2020, 3:40 AM{
"-LzAGaZtoPN702hIyUPh": {
"isActive": true
}
}
I wonder how can i get the dynamic key? Thanks!abdellah
01/22/2020, 10:32 AMJulius
01/22/2020, 1:55 PMval HEX_CHARS = "0123456789abcdef"
val bytes = MessageDigest.getInstance("SHA-1").digest(stringToHash.toByteArray())
val result = StringBuilder(bytes.size * 2)
bytes.forEach {
val i = it.toInt()
result.append(HEX_CHARS[i shr 4 and 0x0f])
result.append(HEX_CHARS[i and 0x0f])
}
return result.toString()
iOS:
val input = stringToHash.encodeToByteArray()
val digest = UByteArray(CC_SHA1_DIGEST_LENGTH)
input.usePinned { inputPinned ->
digest.usePinned { digestPinned ->
CC_SHA1(inputPinned.addressOf(0), input.size.convert(), digestPinned.addressOf(0))
}
}
return digest.joinToString(separator = "") { it.toString(16) }
Arkadii Ivanov
01/22/2020, 2:29 PMandroidMain
source set? I tried both res
and resources
folder names, the last one seems recognized but resources are not accessible (nor from the code or from e.g. layouts).nrobi
01/22/2020, 2:54 PM-Xobjc-generics
? I’m getting Any?
on iOS when I’m trying to consume some genericsMaurice Jouvet
01/22/2020, 3:56 PMkapt("androidx.lifecycle:lifecycle-compiler:$lifecycleVersion")
But with my configuration it’s not working, can’t find the solution.. It says, required KaptOption..
Here is what I have:
sourceSets {
val androidMain by getting {
kotlin.srcDir("src/main/kotlin")
dependencies {
kapt("androidx.lifecycle:lifecycle-compiler:$lifecycleVersion")
Maurice Jouvet
01/23/2020, 8:40 AMconfigure(listOf(iosArm32, iosArm64, iosX64)) {
compilations {
val main by getting {
// extraOpts("-Xobjc-generics -lsqlite3")
kotlinOptions {
freeCompilerArgs = listOf("-Xobjc-generics", "-lsqlite3")
}
}
}
binaries.framework {
export("org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$coroutines_version")
baseName = frameworkName
}
}
chrmelchior
01/23/2020, 11:05 AMkotlinOptions
(specifically freeCompilerArgs
) for android
targets? I must be missing something obvious, but android.compilations
is just an empty array (which is also a bit weird and doesn’t match https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#default-project-layout) and using
targets.all {
compilations.all {
kotlinOptions {
freeCompilerArgs = ["..."]
}
}
}
does not work either (which kinda makes sense since the compilations array is empty).Sylvain Patenaude
01/23/2020, 2:29 PMlinking module flags 'SDK Version': IDs have conflictiing values...
Sylvain Patenaude
01/23/2020, 7:41 PMArray<String>
in Kotlin Multiplatform. Is this specific type consumable from Swift? If so, what is the equivalent type in Swift?
EDIT: Looks like it's KotlinArray
in Swift.
EDIT2: Well, looks like KotlinArray
is a generated type from my framework itself. I wonder if I shouldn't use List<String>
instead of Array<String>
? Would it then translate into the desired type in Swift (which would be [String]
I guess)?Henrik
01/24/2020, 7:32 AMJuhani Lehtimäki
01/24/2020, 2:57 PMsuspend
do not show up in the compiled iOS code and cannot be called. Do we have to remove coroutine support from our shared code or is there some trick to make it work?Kris Wong
01/24/2020, 3:41 PMCLOVIS
01/25/2020, 10:37 PMNick Halase
01/25/2020, 11:00 PMcommonMain
and commonTest
SourceSets
exist regardless of the target. If my project only has ios and android targets, does that mean I can't run unit tests on the common code contained in commonTest/test
?Grantas33
01/25/2020, 11:06 PMbuild/js/packages_imported/ktor-ktor-client-core/1.3.0/ktor-ktor-client-core.js
Module not found: Error: Can't resolve 'abort-controller' in 'build\js\packages_imported\ktor-ktor-client-core\1.3.0'
build/js/packages_imported/ktor-ktor-io/1.3.0/ktor-ktor-io.js
Module not found: Error: Can't resolve 'text-encoding' in 'build\js\packages_imported\ktor-ktor-io\1.3.0'
I'm having these errors in the browser console of my KotlinJS project. I'm not using ktor as a direct dependency - I use a kotlin multiplatform library which uses ktor. I've had the same errors when developing the aforementioned library, and after adding jsMain npm dependencies in the library's build gradle file like this:
api(npm("text-encoding"))
api(npm("abort-controller"))
the errors dissapeared from the library. However, they still do exist in my KotlinJS project which uses this library. What could be the issue here?lavong
01/26/2020, 9:51 AMJaCoCo
obviously helps with JVM code only at best, right?baxter
01/26/2020, 10:43 PMPiasy
01/27/2020, 12:19 PMkotlin.native.initRuntimeIfNeeded()
in my kotlin code before I connect to server, but it still crash my program. If I fire the callback on main thread, e.g. APP C++ code calls kotlinTestFunc
, which calls cppSocketIOConnect
, and fire the callback directly inside cppSocketIOConnect
, it works fine.
Do I miss something?Big Chungus
01/27/2020, 3:51 PMMaurice Jouvet
01/27/2020, 4:28 PMVenkat , Bangalore , India
01/28/2020, 6:50 AMBig Chungus
01/28/2020, 1:20 PMkotlin.js.experimental.generateKotlinExternals=true
seems to be doing nothing (or I might be looking for generated externals wrong)Kris Wong
01/28/2020, 4:59 PMbaxter
01/29/2020, 4:45 AMnrobi
01/29/2020, 7:55 AMList<SomeModel>
converted to NSArray
with losing the information about it’s type, SomeModel
nrobi
01/29/2020, 7:55 AMList<SomeModel>
converted to NSArray
with losing the information about it’s type, SomeModel
Andrey Chernov
01/29/2020, 8:17 AMOlenyov Kirill
01/29/2020, 8:43 AMnrobi
01/29/2020, 9:26 AMObservable<List<SomeModel>>
and my use-case is the same as yours with test2
kpgalligan
01/29/2020, 9:41 AMnrobi
01/29/2020, 9:48 AME/A
for the Observable
and abstract class instead of interface for the Observer