Hey folks, I’m trying to find out why for some cla...
# multiplatform
i
Hey folks, I’m trying to find out why for some classes defined on KN there is strange name generated (in header files), for example:
Copy code
__attribute__((swift_name("Kotlinx_coroutines_core_nativeCoroutineDispatcher")))
@interface MainKotlinx_coroutines_core_nativeCoroutineDispatcher : MainKotlinAbstractCoroutineContextElement <MainKotlinContinuationInterceptor>

__attribute__((swift_name("Ktor_client_coreHttpClientEngineConfig")))
@interface MainKtor_client_coreHttpClientEngineConfig : KotlinBase

etc.
And it looks weird on Swift side to have smth like this
public class UICoroutineContext: Kotlinx_coroutines_core_nativeCoroutineDispatcher
o
Name conversion is documented in https://github.com/JetBrains/kotlin-native/blob/master/OBJC_INTEROP.md#name-translation, not sure what kind of strangeness you’re talking about.
i
So from this
The names of Kotlin classes and interfaces are prefixed when imported to Objective-C. The prefix is derived from the framework name.
it means
Kotlinx_coroutines_core_native
is a name of coroutine native framework?