Pamela Hill
Developer Advocate at JetBrains
Pamela is a Developer Advocate for Kotlin Multiplatform at JetBrains and has more than 20 years of experience writing desktop, web and mobile apps.
Kotlin Multiplatform Alchemy: Making Gold out of Your Swift Interop
Now that Kotlin Multiplatform has reached Stable, the technology is ready to be adopted and deployed into production. However, one aspect frequently causes irritation in the mobile use case: Kotlin/Swift interoperability. This issue often leads to compromise on one or both sides, with solutions that are not idiomatic in either language. So how can this be mitigated, if not completely resolved?
In this talk, I will focus on the current state of Kotlin/Swift interoperability and the limitations you can expect to encounter when developing your Kotlin Multiplatform apps. I will share tips and tricks on making Kotlin Multiplatform APIs that will make your team's integration code shine. I will also explain JetBrains' exciting plans for improving Kotlin/Swift interoperability.
Join the session to discover how to turn your interop difficulties into Multiplatform gold!
Kotlin Multiplatform Beyond the Basics
This is an intermediate / advanced workshop for experienced Android developers. It is aimed at engineers who have built projects with Kotlin and Jetpack Compose and now want to progress onto multiplatform application development.
The workshop is split into two parts. In the morning session, we’ll build an application entirely using Kotlin Multiplatform libraries. This will feature a Compose Multiplatform user interface, testing with kotlin.test and Kotest, and networking with Ktor and coroutines. Additional libraries will be used to show data caching, dependency injection, serialization, and more.
In the afternoon session, we’ll explore real-world issues associated with taking these kinds of applications into production. We’ll explore general issues with architecture and deployment but then shift our focus to issues specific to iOS. In particular, we’ll cover how best to package and expose Kotlin APIs to be consumed by Swift code, and vice versa. We’ll also explore how to share business logic with a SwiftUI interface, work with XCode, and distribute your application.
Morning Topics
- Review the basics of KMP development.
- Introducing the workshop sample application.
- Adding shared business logic with unit tests.
- Platform integration with expected and actual declarations.
- Extending the existing Compose Multiplatform UI.
- Interacting with services via Ktor and coroutines.
- Creating integration tests at different levels.
- Refactoring the app to use dependency injection.
- Adding client side caching to improve performance.
Afternoon Topics
- Best practices for building multiplatform applications.
- Guidelines for creating and distributing your KMP library.
- Making the most out of the existing KMP ecosystem.
- A primer for using XCode effectively in KMP apps.
- Effectively sharing Kotlin APIs with Swift codebases.
- Mixing Compose Multiplatform and SwiftUI components.
- Options for testing a Compose Multiplatform UI in iOS.
- Distributing your shared code to iOS teammates.