Hey everyone, I’m trying to use KMMBridge for publ...
# multiplatform
m
Hey everyone, I’m trying to use KMMBridge for publishing iOS framework, I was using cocoapods plugin for exporting the xcframework and it was working fine. Now I’m trying to use
XCFramework
class without cocoapods but getting error if I add kmmbridge plugin.
Copy code
kotlin {

    val frameworkName = "Test"
    val xcf = XCFramework(frameworkName)
    listOf(
        iosArm64(),
        iosSimulatorArm64()
    ).forEach { iOSTarget ->
        iOSTarget.binaries.framework {
            isStatic = true
            baseName = frameworkName
            xcf.add(this)
        }
    }
}

kmmbridge {
    mavenPublishArtifacts()
    manualVersions()
    spm()
}
Error:
Copy code
Caused by: org.gradle.api.internal.tasks.DefaultTaskContainer$DuplicateTaskException: Cannot add task 'assembleTestReleaseXCFramework' as a task with that name already exists.
If I remove kmmbridge plugin or use cocoapod plugin with kmmbridge then its working fine.
d
I don't think you need to use manually export
XCFramework
because kmmbridge does that for you. Though this shouldn't happen because kmmbridge checks if any
XCFramework
is registed or not.
s
I am having the same issue. Any fix?