Is there any way to import some iOS network specif...
# multiplatform
g
Is there any way to import some iOS network specific classes like
platform.Network.NWConnection
to an
actual
Kotlin class? I can see classes like
platform.Network.nw_connection_t
but I am not sure they are the same.
s
NWConnection
is a Swift-only class with a Swift-ier API than
nw_connection_t
(you can see only Swift is listed as a supported language the top-right of Apple’s documentation for NWConnection). It’s not available to use from Kotlin, which only has Obj-C interoperability afaik.
nw_connection_t
is the old equivalent you’ll have to use
g
It makes sense, thanks.
105 Views