~/talk

Calling Kotlin Multiplatform Coroutines from Swift with the help of KMP-NativeCoroutines

Talkat droidcon Berlin 2023 · 2023-07-05..07-07· [kotlin, react-native]
links:none on file
slides:none on file

Demo app uses Kotlin Multiplatform plus the KMP-NativeCoroutines Gradle plugin to expose suspending functions and flows to Swift as native APIs with no nullable wrappers, fixing generic loss for flows. It generates async/await and Combine friendly bindings, supports AsyncSequence, and demonstrates automatic cancellation when views deinit. Exception handling still requires try/catch because unhandled Kotlin exceptions crash the app. The repository and examples (suspend returns true/false, flows emit 0 1 2 then throw) compile and behave as shown.

AI-written summary · about

  1. 0:00Introduction and speaker
  2. 1:51Three ways to call coroutines
  3. 6:07Manual wrapper approach
  4. 7:12KMP NativeCoroutines solution
  5. 9:18Handling flows in Swift
  6. 12:26Cancellation and exceptions
  7. 16:43SwiftUI integration
  8. 19:52Summary and resources
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.