nrobi

    nrobi

    2 years ago
    I’m using
    cocoapods
    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?
    Artyom Degtyarev [JB]

    Artyom Degtyarev [JB]

    2 years ago
    Can you share the build.gradle(.kts)? Also, maybe looking through this doc(https://github.com/JetBrains/kotlin-native/blob/master/COCOAPODS.md) can help a bit.
    nrobi

    nrobi

    2 years ago
    s

    Sean Keane

    2 years ago
    Are you using generics? you might need to add this.
    iOSTarget("ios") {
        compilations {
            val main by getting {
                kotlinOptions.freeCompilerArgs = listOf("-Xobjc-generics")
            }
        }
    }
    nrobi

    nrobi

    2 years ago
    Yess. I’ve already added that
    Artyom Degtyarev [JB]

    Artyom Degtyarev [JB]

    2 years ago
    So, you’re able to install the pod correctly, but it fails when the Xcode build is run? Please check the Podfile in your project directory.
    nrobi

    nrobi

    2 years ago
    Yes. exactly, it sees the
    common
    when I’m trying to import but fails at the build
    Artyom Degtyarev [JB]

    Artyom Degtyarev [JB]

    2 years ago
    You can have additional output by adding Gradle’s
    --info
    flag to the appropriate building phase in Xcode.
    nrobi

    nrobi

    2 years ago
    Yes now I’m having the following error
    could not find kodein-di-erased.klib
    Artyom Degtyarev [JB]

    Artyom Degtyarev [JB]

    2 years ago
    nrobi

    nrobi

    2 years ago
    Yes. Exactly. But I've checked and I'm using kotlin-native-macos-1.3.60
    Managed to fix it by upgrading kodein to
    6.5.1
    s

    Sean Keane

    2 years ago
    Did you update Ktor or a different lib? Ktor is currently on 1.3.0
    nrobi

    nrobi

    2 years ago
    Sorry. I ment
    kodein