title: Listen to Kotlin coroutine flow from iOS
body: <p>I have setup a Kotlin Multiplatform project and attached a <a href="https://cashapp.github.io/sqldelight/multiplatform_sqlite/" rel="noreferrer">SQLDelight</a> database to it. Its all setup and running correctly as i have tested it on the android side using the following:</p>
  <p>commonMain:</p>
  <pre><code>    val backgroundColorFlow: Flow&lt;Color&gt; =
              dbQuery.getColorWithId(BGColor.id)
                      .asFlow()
                      .mapToOneNotNull()
  </code></pre>
  <p>which triggers fine in the Android projects <code>MainActivity.kt</code> using:</p>
  <pre><code>database.backgroundColorFlow.onEach { setBackgroundColor(it.hex) }.launchIn(lifecycleScope)
  </code></pre>
  <p>but when trying to access the same call in the iOS projects app delegate i get the following options and im unsure how to use them or convert them into my <code>BGColor</code> object:</p>
  <pre><code>database.backgroundColorFlow.collect(collector: T##Kotlinx_coroutines_coreFlowCollector, completionHandler: (KotlinUnit?, Error?) -&gt; Void)
  </code></pre>
  <p>can anyone help me with how to use this?</p>