Alexander von Below
03/20/2023, 3:03 PM> Task :shared:cinteropCocoaMQTTIosSimulatorArm64
Exception in thread "main" java.lang.Error: /Users/below/dev/kmp/PodSample/shared/build/cocoapods/synthetic/IOS/build/Release-iphonesimulator/CocoaMQTT/CocoaMQTT.framework/Headers/CocoaMQTT-Swift.h:560:58: error: cannot find protocol declaration for 'MGCDAsyncSocketDelegate'
Any idea what could be wrong? Thank you!Konstantin Tskhovrebov
03/20/2023, 3:05 PMAlexander von Below
03/20/2023, 3:37 PMMichal Harakal
03/20/2023, 4:58 PMMGCDAsyncSocketDelegate
is missing, which is part of MqttCocoaAsyncSocket
and this is defined as spec.dependency of the library. If I define MqttCocoaAsyncSocket
to be imported explicitly via build.gradle.kts
file, for some reason is cinterpro
task for MqttCocoaAsyncSocket
called always after the main lib CocoaMQTT
. So I am also still getting the error …Konstantin Tskhovrebov
03/20/2023, 7:25 PMa-dd
03/22/2023, 11:20 PM@import
directive usages in a generated Obj-C header. It is supported only since 1.8.20-RC and it requires additional cinterop flag for now:
pod("CocoaMQTT") {
extraOpts = listOf("-compiler-option", "-fmodules")
}
More details in https://youtrack.jetbrains.com/issue/KT-39120/Cinterop-tool-doesnt-support-the-fmodules-compiler-argumentMichal Harakal
03/23/2023, 4:57 PM