Sam
08/23/2020, 9:22 PMOrhan Tozan
08/24/2020, 11:53 AMDaniele B
08/24/2020, 12:11 PMdambakk
08/25/2020, 6:29 AMkotlinNothing
is not a sub-type of NSString
. However, the situation above is an implementation of how this article suggests dealing with serializing nullable and optional properties which I think is overengineered. Instead of using the sealed class to represent the three states present-with-value, present-with-null-value, and not-present you can instead have a data class OptionalProperty<T>(val value: T)
and use it as a nullable property type and still cover all the states. It works as before, but is now much more pleasant to use from swift. But please correct me if I’m wrong.Jeff
08/25/2020, 7:46 AMMikołaj Kąkol
08/25/2020, 9:21 AM*.module
file in main lib, that contains information about every platform and calling multiple time mavenPublish
or sth similar would override that *.module
file.
So basically it comes to how to publish artifacts build on different platforms to a single lib?Marc Knaup
08/25/2020, 11:11 AMNSInteger
in common Darwin code? 😮Sebastien Leclerc Lavallee
08/25/2020, 1:30 PMYour current kotlinx.serialization core version is too low, while current Kotlin compiler plugin 1.4.0 requires at least 1.0-M1-SNAPSHOT. Please update your kotlinx.serialization runtime dependency.
The problem is, I never updated to Kotlin 1.4. My Kotlin used for dependencies is 1.3.70. I did came across a warning yesterday that sais something like: Common module has an external compiler that use Kotlin 1.4
Does that ring a bell to someone? The “only” thing I did was to update from gradle 5.6.X to 6.5, but I doubt it had that kind of repercussion. Thanks 🙂Maurice Jouvet
08/25/2020, 1:38 PMzsperske
08/25/2020, 6:21 PMUndefined symbols for architecture arm64:
"_OBJC_CLASS_$_SharedCodeEventUiModel", referenced from: objc-class-ref in EventUI.o
I assume I need to change my gradle setup but I'm unsure what exactly I need to change.saket
08/26/2020, 1:37 AMExecution failed for task 'compileKotlinIos':
Compilation failed: Deserializer for declaration public kotlinx.coroutines/SingleThreadDispatcher|null[0] is not found
bughunter
08/26/2020, 8:56 AMMarc Knaup
08/26/2020, 5:27 PMzsperske
08/26/2020, 7:21 PMNo such module 'SharedCode'
error on my import statementsIvann Ruiz
08/26/2020, 7:46 PMbuild.gradle.kts
file I can create ios/android targets by adding these lines👇 it all compiles and runs fine.
plugins {
kotlin("multiplatform")
}
kotlin {
ios()
android()
}
but when i try to put this same logic in the build.gradle.kts
of a new :common
module it just won't work. First it gives me an error on the android()
line. Second, i get around this by adding jvm("android")
instead, but then my app crashes when running.
The point of doing this is so I can have all the multiplatform gradle code separate from the app gradle. Thoughts?gumil
08/26/2020, 8:01 PMUri Abad
08/27/2020, 7:16 AM//Common
expect fun runBlockingAdapter(block: suspend () -> Unit)
//JVM
actual fun runBlockingAdapter(block: suspend () -> Unit) = kotlinx.coroutines.runBlocking { block() }
//Native
actual fun runBlockingAdapter(block: suspend () -> Unit) {
throw UnsupportedOperationException()
}
Larten
08/27/2020, 12:35 PMMaurice Jouvet
08/27/2020, 1:27 PMaudax
08/27/2020, 2:24 PMArtem Kopan
08/27/2020, 8:23 PMplugins {
id "org.jetbrains.kotlin.multiplatform"
id("com.android.library")
}
android {
compileSdkVersion(29)
defaultConfig {
minSdkVersion(19)
targetSdkVersion(29)
}
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
}
kotlin {
android()
iosX64("ios")
}
louiscad
08/28/2020, 8:00 AMSeyed Jafari
08/28/2020, 9:44 AMcommonMain
other modules can not resolve that code correctly. so some functions will turn red and the ide will not help with compilation.
the worst part is I can not use cmd + b
to see the declaration, because it takes me the compiled code.
All these unresolved codes are ok when I run/compile the App.
Touchlab Kamp starter has the same problem too Bread
is not resolved but project can be run (check image). is there any fix I can apply to resolve this issue?
Bread is missing.jpgShawnV
08/28/2020, 8:16 PMGunslingor
08/30/2020, 12:19 AMsaket
08/30/2020, 4:56 AMAG
08/30/2020, 4:30 PMInvalidMutabilityException
class Api {
private val client = HttpClient()
var address = Url("<https://tools.ietf.org/rfc/rfc1866.txt>")
fun request(callback: (String) -> Unit) {
GlobalScope.apply {
launch(ApplicationDispatcher) {
val result: String = client.get {
url(address.toString())
}
callback(result)
}
}
}
}
Ivann Ruiz
08/30/2020, 5:20 PMapp
directory to android
so it's more clear when working with KMP. All you have to do is rename the folder with Shift + F6
, and go to settings.gradle.kts
and change the include string from app
to android
.zsperske
08/30/2020, 11:26 PMiosTest
package? Or do people usually write their iOS UI tests in swift?Hyun
08/31/2020, 12:29 AMGradle import errors
shows.
syncing is success and build also success.
but, Android Studio doesn’t recognize classes or functions
so, I assume that the Gradle import errors
may be related to the problem
Is there any thing I can try?
Kindly let me know if further information is required.
my project contains the below
• android Jetpack compose
• multiplatform module use multipltform library,
• Ktor, Ktor client
• Sqldelight
• coroutine mtHyun
08/31/2020, 12:29 AMGradle import errors
shows.
syncing is success and build also success.
but, Android Studio doesn’t recognize classes or functions
so, I assume that the Gradle import errors
may be related to the problem
Is there any thing I can try?
Kindly let me know if further information is required.
my project contains the below
• android Jetpack compose
• multiplatform module use multipltform library,
• Ktor, Ktor client
• Sqldelight
• coroutine mtapi
configuration)
and multiplatform module doesn’t contains kotlin-coroutines-core
as library already contains.
so, when I added kotlin-coroutines-core
on multiplatform module, it’s working fine to recognize classes
but, I think it should work when dependency exist in the multiplatform library, even if the dependency doesn’t exist in the multiplatform module
it’s not related to kotlin-coroutines-core
, when I tested, other dependencies also have some problem. it seems related to api
configurationJeff
08/31/2020, 5:12 AMbuild.gradle.kts
files are highlighted in red although things seem to work correctly :/Konstantin Tskhovrebov
09/03/2020, 12:34 PMHyun
09/03/2020, 8:41 PM