https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
l

Luka

05/11/2020, 8:05 AM
Hello . I have problems with adding ios framework to xcode. I use cocoapods plugin. It is generated without error and added to xcode project when "pod install" is called. But when i try to run it, i see this error:
Copy code
This is my shared build.gradle file:


plugins {
    id("org.jetbrains.kotlin.multiplatform")
    id("com.android.library")
    id "org.jetbrains.kotlin.native.cocoapods"

}

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.0"

    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        consumerProguardFiles '<http://consumer-rules.pro|consumer-rules.pro>'
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), '<http://proguard-rules.pro|proguard-rules.pro>'
        }
    }

}

// CocoaPods requires the podspec to have a version.
version = "1.0"

kotlin {
    ios()
    android()

    cocoapods {
        // Configure fields required by CocoaPods.
        summary = "Some description for a Kotlin/Native module"
        homepage = "Link to a Kotlin/Native module homepage"

        // The name of the produced framework can be changed.
        // The name of the Gradle project is used here by default.
        frameworkName = "toshl_shared"
    }

sourceSets {
    commonMain.dependencies {
        api 'org.jetbrains.kotlin:kotlin-stdlib-common'

    }

    androidMain.dependencies {
        implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
        implementation "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlin_version"

    }

    iosMain.dependencies {
        implementation "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlin_version"

    }
}

}
I guess i am in no luck