streetsofboston
09/29/2020, 8:54 PMios()
into
val onPhone = System.getenv("SDK_NAME")?.startsWith("iphoneos") ?: false
if (onPhone) {
iosArm64("ios")
} else {
iosX64("ios")
}
However, this causes the packForXcode
task configuration to fail because of this expression:
kotlin.targets.getByName<KotlinNativeTarget>(targetName).binaries.getFramework(mode)
To fix this, change the above expression to:
kotlin.targets.getByName<KotlinNativeTarget>("ios").binaries.getFramework(mode)
After this, you may get red-lines in the commonMain
source-set.
To fix this, disable setting the enableGranularSourceSetsMetadata
in your gradle.properties
, like this:
...
#kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false