Can I see your code? (especially Scope and Dispatcher class)
Yuya Horita
1

private class MainDispatcher: CoroutineDispatcher() {
override fun dispatch(context: CoroutineContext, block: Runnable) {
dispatch_async(dispatch_get_main_queue()) { block.run() }
}
}

internal class MainScope : CoroutineScope{
private val dispatcher = MainDispatcher()
private val job = Job()

override val coroutineContext: CoroutineContext
get() = dispatcher + job
}

as far I can tell it is exactly as you wrote

actual fun getRandomString(block: ((String) -> Unit)) {
MainScope().launch {
delay(3000)
block("random string")
}
}

and this is the code that errors when called from iOS.