mattinger
09/14/2022, 3:32 PMJeff Lockhart
09/14/2022, 4:36 PM______common______
| |
_______apple______ jvmCommon
| | | | |
___ios__ macosX64 macosArm64 | |
| | | | |
iosArm64 iosX64 iosSimulatorArm64 android jvm
Jeff Lockhart
09/14/2022, 5:02 PMmattinger
09/14/2022, 6:06 PMval iosMain by creating {
dependsOn(commonMain)
}
val iosTest by creating {
dependsOn(commonTest)
}
val iosArm64Main by getting {
dependsOn(iosMain)
}
val iosArm64Test by getting {
dependsOn(iosTest)
}
val iosSimulatorArm64Main by getting {
dependsOn(iosMain)
}
val iosSimulatorArm64Test by getting {
dependsOn(iosTest)
}
val iosX64Main by getting {
dependsOn(iosMain)
}
val iosX64Test by getting {
dependsOn(iosTest)
}
mattinger
09/14/2022, 6:06 PMJeff Lockhart
09/14/2022, 9:05 PMios()
shortcut, since you're creating iosMain and iosTest manually. That's one difference with my setup. But I just tried switching to manually creating as well and it continues to work the same.
What is your CocoaPods dependency? Can you confirm you can see the dependency from code within iosArm64Main (or either of the other ios* source sets)?mattinger
09/14/2022, 11:28 PMmattinger
09/14/2022, 11:36 PMmattinger
09/14/2022, 11:36 PMios {
binaries {
framework {
baseName = "AnalyticsMultiplatform"
}
}
}
mattinger
09/14/2022, 11:36 PMmattinger
09/14/2022, 11:36 PMcocoapods {
summary = "AnalyticsMultiplatform"
ios.deploymentTarget = "14.0"
version = "1.0-SNAPSHOT"
framework {
baseName = "AnalyticsMultiplatform"
isStatic = false
transitiveExport = false
embedBitcode(org.jetbrains.kotlin.gradle.plugin.mpp.BitcodeEmbeddingMode.DISABLE)
}
pod("DSJSONSchemaValidation")
}
Jeff Lockhart
09/15/2022, 12:59 AMas soon as i switch to using “ios { }” shortcut, it can no longer see any cocoapods in iosMain
I thought that it can't see the cocoapods in iosMain before using the
ios()
shortcut. Is this not the case?Jeff Lockhart
09/15/2022, 1:08 AMpod("DSJSONSchemaValidation")
to my project and I am able to see those two imports in my shared apple source set.Jeff Lockhart
09/15/2022, 1:17 AMmattinger
09/15/2022, 2:26 AMmattinger
09/15/2022, 2:27 AMmattinger
09/15/2022, 2:29 AMmattinger
09/15/2022, 3:33 AMkotlin.mpp.enableCInteropCommonization=true
mattinger
09/15/2022, 3:34 AMJeff Lockhart
09/15/2022, 5:52 AMI needed this in gradle.properties
Ah, yes. This makes sense. What are you running into with the xcframework build?Copy codekotlin.mpp.enableCInteropCommonization=true