Join Slack
Powered by
I'm try to make a blocking network call on iOS but...
# kotlin-native
t
thevery
06/18/2018, 5:49 PM
I'm try to make a blocking network call on iOS but app either crashes (because of wrong thread access) or hang (because you can't block main thread and schedule download on the same thread simultaneously like in
https://github.com/JetBrains/kotlinconf-spinner/blob/master/kotlin-native/samples/fullstack/clients/ios/src/main/kotlin/platformUtils.kt#L72)
. Should I use workers or there is some simpler way?
o
olonho
06/18/2018, 6:15 PM
To run job in async mode take a look at
https://github.com/JetBrains/kotlin-native/blob/master/samples/objc/src/main/kotlin/Window.kt
t
thevery
06/19/2018, 6:13 PM
@olonho
iOS blocking network request in swift:
http://www.stefanovettor.com/2015/12/10/synchronous-requests-with-nsurlsession/
5
Views
Open in Slack
Previous
Next