https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

stanislav

03/21/2019, 10:46 AM
Hi. I'm getting
mutation attempt of frozen io.ktor.client.request.HttpRequestPipeline@8275c448
on iOS.
r

ribesg

03/21/2019, 10:49 AM
Don’t put your client in an
object
. Kotlin `object`s are frozen on iOS.
AFAIK the fact the it freezes something in the pipeline is a bug, but with the current version you can’t have an
HttpClient
instance in an
object
.
o

olonho

03/21/2019, 11:07 AM
just use top level
val
, and it will work everywhere (on the main thread, ofc)
👍 1
s

stanislav

03/21/2019, 12:23 PM
Thanks
7 Views