0

I have a Kotlin Multiplatform Mobile project (KMP) targeting Android + iOS. My setup:

Kotlin version: 2.2.21

Kotlin Multiplatform plugin: 2.2.21

CocoaPods plugin in build.gradle.kts:

plugins {
    alias(libs.plugins.kotlinMultiplatform)
    alias(libs.plugins.androidApplication)
    alias(libs.plugins.composeMultiplatform)
    alias(libs.plugins.composeCompiler)
    alias(libs.plugins.kotlinSerialization)
    alias(libs.plugins.ksp)
    alias(libs.plugins.room)
    alias(libs.plugins.sentry)
    kotlin("native.cocoapods")
}

cocoapods {
        version = "1.0"
        summary = "Some description for the Shared Module"
        homepage = "Link to the Shared Module homepage"
        ios.deploymentTarget = "14.1"
        podfile = project.file("../iosApp/Podfile")

        pod("Sentry") {
            version = "8.57.1"
            extraOpts += listOf("-compiler-option", "-fmodules")
        }
    }

Podfile exists at iosApp/Podfile

Android Studio sync works fine

CocoaPods installed via user-local Ruby (no sudo) Problem:

When I open iosApp.xcworkspace in Xcode and try to build, I get:

Incompatible 'embedAndSign' Task with CocoaPods Dependencies
The 'embedAndSign' task cannot be used in projects that have CocoaPods dependencies configured.

How can I fully disable the embedAndSign task and correctly integrate CocoaPods dependencies in a KMP shared module so that Xcode can build the iOS app without this conflict?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.