https://kotlinlang.org logo
#ios
Title
# ios
m

Maurice Wingbermuhle

11/05/2020, 1:08 PM
I've managed to fix in my project - the trick is to not use the HMPP for iOS. So instead of this:
Copy code
configure([iosX64Main, iosArm64Main]) {
      dependsOn iosMain
}
use this:
Copy code
iosArm64Main {
    dependencies {
    }
    kotlin.srcDir("${projectDir}/src/iosMain/kotlin")
}

iosX64Main {
    dependencies {
    }
    kotlin.srcDir("${projectDir}/src/iosMain/kotlin")
}
If you have any dependencies in
iosMain
you need to duplicate them to the 2 specific variant.
iosMain
needs to still exist, but is allowed to be empty. This restores my compiler setup for native platform code, including code completion. I am still using HMPP for JVM targets, and that still works without any issue.
👍 1