icerockdev / moko-socket-io

MOKO SocketIo by IceRock is Socket.IO implementation Kotlin Multiplatform library
https://moko.icerock.dev/
Apache License 2.0
116 stars 19 forks source link

Used invalid version of kotlinx-serialization #12

Closed sameerthapaevontech closed 3 years ago

sameerthapaevontech commented 3 years ago

Hi. I am trying to use the moko-socket library for KMM. App is running fine in android but for iOS I am getting this issue when I run the iOS app:

java.lang.IllegalStateException: Deserializer for declaration public kotlinx.serialization.json/JsonObject|null[0] is not found

Gradle file is like this:

dependencies{
        commonMainApi("dev.icerock.moko:socket-io:0.2.1")
        commonMainApi("org.jetbrains.kotlinx:kotlinx-serialization-core:1.2.1")
        commonMainApi("org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.1")
    }

    cocoapods {
        ..
        podfile = project.file("../iosApp/Podfile")
        pod("mokoSocketIo") {
            source = git("https://github.com/icerockdev/moko-socket-io.git") {
                tag = "0.2.1"
            }
        }
    }

Gradle sync is successful but I am not able to run the iOS app. I am new to gradle and kotlin. Any help will be appreciated.

Thanks!

Alex009 commented 3 years ago

hi! in moko-socket-io now used old version of kotlinx serialization. we should update used version...we in progress of update moko libs to kotlin 1.5.10 and we will update serialization version too. for now you can clone repo and change version of serialization and publish to mavenLocal or connect with your project via gradle composite build