Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kotlin Multiplatform

Kotlin Multiplatform

Introduction to Kotlin Multiplatform that I gave at Kotlin Everywhere in Minneapolis on October 5, 2019

Bryan Herbst

October 05, 2019
Tweet

More Decks by Bryan Herbst

Other Decks in Technology

Transcript

  1. plugins { id("org.jetbrains.kotlin.native.cocoapods") } kotlin { cocoapods { summary =

    "Shared library" homepage = "http://github.com/shared-lib" } }
  2. Android Notes UI NotesView Model Note (model) Note API iOS

    Notes UI NotesView Controller Note (model) Note API
  3. Android Notes UI NotesView Model Note API iOS Notes UI

    NotesView Controller Note API Shared Note (model)
  4. iOS struct Note { let content: String let status: String

    } Android data class Note( val content: String, val status: Status ) enum class Status { }
  5. iOS struct Note { let content: String let status: String

    } Android data class Note( val content: String, val status: Status ) enum class Status { }
  6. iOS struct Note { let content: String let status: String

    } Android data class Note( val content: String, val status: Status ) enum class Status { }
  7. Android Notes UI NotesView Model Note API iOS Notes UI

    NotesView Controller Note API Shared Note (model)
  8. class NoteApi() { private val client = HttpClient() suspend fun

    fetchNote(): String = client.get<String>("http://...") }