Hi guys! I've got two iOS projects: main (production project which has been existing for years) and ...
r
Hi guys! I've got two iOS projects: main (production project which has been existing for years) and test (simple project which you can get from Xcode wizard). And I've got multimodule KMM project. When I add KMM umbrella framework to the main project via cocoapods, for some reason it creates the framework with different name from name it links. In test project it works as expected. You can find my cocoapods configuration in the thread. For the main project it creates
domain_facade
framework, but links
MyDomainLogic
. For the test project as expected creates
MyDomainLogic
framework and links
MyDomainLogic
. My current workaround is just setting
cocoapods.name
and
framework.baseName
to
domain_facade
. Also in the main project I get strange runtime exception
kotlin.ClassCastException: kotlin.String cannot be cast to kotlin.String
. It happens in
co.touchlab.sqliter.DatabaseFileContext.kt
on line 39 https://github.com/touchlab/SQLiter/blob/286784f503f414efd88679362ddac47222b7110f/sqliter-driver/src/appleMain/kotlin/co/touchlab/sqliter/DatabaseFileContext.kt#L39 Again in the test project works without problems. Do you have any ideas?
Copy code
// domain/domain-facade/build.gradle.kts
    cocoapods {
        name = "MyDomainLogic"
        summary = "Domain logic"
        homepage = "Link to a Kotlin/Native module homepage"
        ios.deploymentTarget = "10.0"
        podfile = project.file("../../iosApp/Podfile")
        framework {
            baseName = "MyDomainLogic"
            export(project(":domain:domain-core"))
            export(project(":utils"))
            export(project(":coroutinesinterop"))
            export(deps.kotlin.datetime)
            embedBitcode(BITCODE)
            linkerOpts += "-lsqlite3"
        }
        xcodeConfigurationToNativeBuildType["CUSTOM_DEBUG"] = NativeBuildType.DEBUG
        xcodeConfigurationToNativeBuildType["CUSTOM_RELEASE"] = NativeBuildType.RELEASE
    }
r
Also in the main project I get strange runtime exception
kotlin.ClassCastException: kotlin.String cannot be cast to kotlin.String
.
Are you by any chance using multiple KMM frameworks in your iOS project?
👀 1