We can execute a piece of code on the main thread with a specific delay on the android platform by using the postDelayed
method of Handler
1
Is there an equivalent way when using Kotlin native to run on iOS devices?
You could use Kotlin Coroutine's delay() with Dispatchers.Default possibly from the native-mt branch of coroutines.
You can read more here