Hello! I am trying to use a multiplatform library ...
# ktor
d
Hello! I am trying to use a multiplatform library that uses ktor for requests in an iOS Network Extension target and every time
HttpClient
is initialized I encounter an
EXC_BAD_ACCESS
crash in
Kotlin_ObjCExport_convertUnmappedObjCObject
method Here is the stack trace:
Copy code
Crashed: com.apple.main-thread
0  WPNetworkExtension             0x41d8f4 Kotlin_ObjCExport_convertUnmappedObjCObject + 72
1  WPNetworkExtension             0x41d8f0 Kotlin_ObjCExport_convertUnmappedObjCObject + 68
2  ConnectSDK                     0x2d5644 Kotlin_Interop_refFromObjC + 68
3  ConnectSDK                     0x15db18 interpretObjCPointer + 136
4  ConnectSDK                     0x44ee74 kfun:io.ktor.client.engine.darwin.DarwinClientEngine#<init>(io.ktor.client.engine.darwin.DarwinClientEngineConfig){} + 496
5  ConnectSDK                     0x44eb58 kfun:io.ktor.client.engine.darwin.Darwin#create(kotlin.Function1<io.ktor.client.engine.darwin.DarwinClientEngineConfig,kotlin.Unit>){}io.ktor.client.engine.HttpClientEngine + 276
6  ConnectSDK                     0x44154c kfun:io.ktor.client.engine.HttpClientEngineFactory#create(kotlin.Function1<1:0,kotlin.Unit>){}io.ktor.client.engine.HttpClientEngine-trampoline + 108
7  ConnectSDK                     0x40d89c kfun:io.ktor.client#HttpClient(io.ktor.client.engine.HttpClientEngineFactory<0:0>;kotlin.Function1<io.ktor.client.HttpClientConfig<0:0>,kotlin.Unit>){0§<io.ktor.client.engine.HttpClientEngineConfig>}io.ktor.client.HttpClient + 440
8  ConnectSDK                     0x4404e4 kfun:io.ktor.client#HttpClient(kotlin.Function1<io.ktor.client.HttpClientConfig<*>,kotlin.Unit>){}io.ktor.client.HttpClient + 344
9  ConnectSDK                     0x440694 kfun:io.ktor.client#HttpClient$default(kotlin.Function1<io.ktor.client.HttpClientConfig<*>,kotlin.Unit>?;kotlin.Int){}io.ktor.client.HttpClient + 188
Note that the same library used in an iOS application target works without issues. Are there limitations regarding ktor used in iOS Network Extensions?
a
Can you please check a simple GET request with Ktor (without the library)?