Hello everyone. I have another issue with Kotlin C...
# kotlin-native
o
Hello everyone. I have another issue with Kotlin Cocoapods plugin. I have tried to add some Kotlin dependencies like ktor, coroutines and serialisation. And now XCode project build fails on the linking step with not finding dependencies error:
Copy code
:-1: e: /Users/oleksandr.stepanov/Documents/Kotlin/kotlin-native/samples/cocoapods/kotlin-library/src/commonMain/kotlin/model/WikiApi.kt: (3, 8): Unresolved reference: io
/Users/oleksandr.stepanov/Documents/Kotlin/kotlin-native/samples/cocoapods/kotlin-library/src/commonMain/kotlin/model/WikiApi.kt: (4, 8): Unresolved reference: io
/Users/oleksandr.stepanov/Documents/Kotlin/kotlin-native/samples/cocoapods/kotlin-library/src/commonMain/kotlin/model/WikiApi.kt: (5, 8): Unresolved reference: io
....
I have pushed my changes in the fork: https://github.com/OlexandrStepanov/kotlin-native/tree/cocoapods-ktor-issue Help what could be wrong in Gradle scripts would be much appreciated. cc @svyatoslav.scherbina
s
Hello. There are two issues in your Gradle scripts: 1.
settings.gradle
lacks
enableFeaturePreview('GRADLE_METADATA')
line (see https://github.com/Kotlin/kotlinx.coroutines#native) 2.
build.gradle
adds dependencies to non-existing source set
iosMain
. Try
iOSMain
instead.
o
Hello @svyatoslav.scherbina, Many thanks for your advices, linking issues are gone now! I have pushed the fixes to that branch. With regards.
👍 1