https://kotlinlang.org logo
Title
a

Anum Amin

05/11/2023, 6:04 PM
With reference to this thread, I am trying to integrate decompose in the Multiplatform compose app. The integration works perfectly fine on Android, but fails to compile on Xcode. It's not able to find
DefaultComponentContext
class although I can verify that it's accessible from Android Studio. I am using
cocoapods
for accessibility of shared code. Also, in the
shared.h
header file of generated iOS framework, I was only able to locate corresponding interface
ComponentContext
, but not concrete implementation. Any idea why these
Decompose
classes are not accessible via shared framework? Configuration:
kotlin.version=1.8.20
agp.version=7.4.2
compose.version=1.4.0
Here are the chunks of shared build.gradle.kts:
cocoapods {
        version = "1.0.0"
        summary = "Some description for the Shared Module"
        homepage = "Link to the Shared Module homepage"
        ios.deploymentTarget = "14.1"
        podfile = project.file("../iosApp/Podfile")
        framework {
            baseName = "shared"
            isStatic = true

            export("com.arkivanov.decompose:extensions-compose-jetbrains:2.0.0-compose-experimental-alpha-02")
            export("com.arkivanov.essenty:lifecycle:1.1.0")
        }
        extraSpecAttributes["resources"] = "['src/commonMain/resources/**', 'src/iosMain/resources/**']"
    }

    sourceSets {
        val commonMain by getting {
            dependencies {
                api("com.arkivanov.decompose:decompose:2.0.0-alpha-02")
                api("com.arkivanov.decompose:extensions-compose-jetbrains:2.0.0-compose-experimental-alpha-02")
                api("com.arkivanov.essenty:lifecycle:1.1.0")
            }
        }