moko-socket-io icon indicating copy to clipboard operation
moko-socket-io copied to clipboard

Support for without org.jetbrains.kotlin.native.cocoapods

Open ramadhansejati opened this issue 1 year ago • 1 comments

Please add support for without jetbrains cocoapods

ramadhansejati avatar Mar 01 '24 10:03 ramadhansejati

hi. without cocoapods plugin you need add manual linking:

kotlin.targets.matching { it is org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget }
    .configureEach {
        val target = this as org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
        target.binaries.matching { it is org.jetbrains.kotlin.gradle.plugin.mpp.Framework }
            .configureEach {
                val framework = this as org.jetbrains.kotlin.gradle.plugin.mpp.Framework
                val frameworks = listOf(
                    project.rootProject.file("path-where-located-mokoSocketIo.framework")
                ).map { "-F${it.path}" }
 
                framework.linkerOpts(frameworks)
            }
    }

Alex009 avatar Mar 04 '24 03:03 Alex009