> Markdown version of [/videos/4-kotlin-multiplatform-true-power-of-native-code-reuse?t=1876](https://www.wearedevelopers.com/videos/4-kotlin-multiplatform-true-power-of-native-code-reuse?t=1876). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Kotlin Multiplatform - True power of native code reuse Stop trading native performance for single-codebase productivity. Learn how to conquer strict memory constraints and share pure business logic across platforms using Kotlin Multiplatform. - **Speakers:** Petar Marijanović - **Event:** WeAreDevelopers LIVE - **Published:** June 12, 2020 - **Duration:** 35:10 - **URL:** https://www.wearedevelopers.com/videos/4-kotlin-multiplatform-true-power-of-native-code-reuse ## Summary Building cross-platform mobile apps traditionally demands choosing between native performance and the productivity of single-codebase solutions like React Native or Flutter. Kotlin Multiplatform bridges this gap by allowing developers to share pure business logic across platforms while generating truly native binaries via Kotlin Native and Kotlin JVM. This grants native app performance, immediate access to new platform features, and a flexible integration model where teams decide exactly how much code to share without adding restrictive engine overhead. Applying Kotlin Multiplatform in a production environment inevitably reveals technical hurdles that simple proof-of-concept projects often mask. The primary architectural challenge stems from fundamental differences in runtime memory management. While Kotlin JVM relies on a relaxed memory model, Kotlin Native enforces a strictly managed model that intentionally crashes at runtime to prevent race conditions and deadlocks. Furthermore, navigating early state limitations with Kotlin Coroutines for iOS concurrency and overcoming restrictions with generic interfaces highlight the need for careful thread management. Overcoming these barriers relies on enforcing an intentional architectural strategy. Adopting a reactive clean architecture that shares nearly 80% of the codebase—sharing everything except the UI layer—allows developers to dramatically minimize memory-heavy boundary jumps between shared and native native platforms. Replacing problematic object generics with Kotlin's native expect and actual declarations provides a flexible, robust path for native feature reuse. Ultimately, restricting main-thread execution exclusively to the native UI layer while centralizing background multi-threading enables engineering teams to successfully transition Kotlin Multiplatform from an experimental framework into a fully production-ready mobile solution. **Keywords:** kotlin multiplatform, cross-platform native development, kotlin native memory model, kotlin JVM integration, kotlin coroutines threading, shared pure functions, reactive clean architecture, strict memory management rules, expect/actual declarations, shared UI layer boundaries, single mobile codebase, native binary compilation, iOS threading challenges, cross-platform state sharing, coin dependency injection ## Chapters 1. **Professional background and early cross-platform mobile experiences** (00:17) — Past experiences with Android development and early cross-platform frameworks highlight the ongoing search for an ideal mobile codebase strategy. 1. **Core principles and benefits of multi-platform development** (02:26) — The vision of writing code once helps teams apply the DRY principle and maintain a single set of bugs across architectures. 1. **Drawbacks of existing cross-platform mobile frameworks** (04:50) — Existing cross-platform solutions often suffer from lower performance, delayed feature adoption, and complicated native bridging setups. 1. **Understanding Kotlin Multiplatform and its compiler targets** (07:17) — Leveraging Kotlin's ability to compile down to JVM, Native, and JavaScript targets enables shared business logic without abandoning native practices. 1. **Solving cross-platform drawbacks with Kotlin Multiplatform** (10:27) — Resolving traditional multi-platform performance issues involves native compilation, seamless interface communication, and selective code sharing. 1. **Planning a production application with Kotlin Multiplatform** (14:48) — Creating a robust full-stack Kotlin backend streamlines the transition from a simple proof of concept to a unified production environment. 1. **Implementing clean architecture with limited code sharing** (17:01) — Deploying a reactive clean architecture enables developers to share pure functions and business logic while keeping native frameworks independent. 1. **Technical failures with memory management and concurrency** (21:14) — Unexpected deadlocks and crashes often stem from conflicting behaviors between Kotlin JVM's relaxed memory model and Kotlin Native's strict concurrency rules. 1. **Rethinking the architecture to maximize logic sharing** (26:10) — Redesigning the application environment maximizes code reuse by deliberately minimizing execution transfers between the shared central logic and native layers. 1. **Key takeaways and future Kotlin Multiplatform improvements** (31:16) — Mastering native memory management principles empowers engineering teams to safely implement dependency injection configurations and thread-bound object scoping. ## Related Moments - [Navigating Kotlin Multiplatform beyond the happy path](https://www.wearedevelopers.com/videos/100143-the-dark-corners-of-kotlin-multiplatform) (from "The Dark Corners of Kotlin Multiplatform") - [How Kotlin Multiplatform differs from cross-platform frameworks](https://www.wearedevelopers.com/videos/276-introducing-kotlin-multiplatform-in-an-existing-project) (from "Introducing Kotlin Multiplatform in an existing project") - [Architectural boundaries and the Kotlin Multiplatform survival kit](https://www.wearedevelopers.com/videos/100143-the-dark-corners-of-kotlin-multiplatform) (from "The Dark Corners of Kotlin Multiplatform") - [Developing front-end client applications using Kotlin Multiplatform libraries](https://www.wearedevelopers.com/videos/1184-location-verification-without-gps) (from "Location Verification without GPS?") - [Centralizing mobile business logic with Kotlin Multiplatform](https://www.wearedevelopers.com/videos/100341-vertical-slice-architecture-micro-frontends-across-mobile-backend-ml) (from "Vertical Slice Architecture: Micro Frontends Across Mobile, Backend & ML") - [Designing cross-platform APIs with team collaboration](https://www.wearedevelopers.com/videos/100143-the-dark-corners-of-kotlin-multiplatform) (from "The Dark Corners of Kotlin Multiplatform") ## Related Articles - [Cross Platform Mobile Development Frameworks to Use in 2025](https://www.wearedevelopers.com/magazine/404-cross-platform-mobile-development-frameworks-to-use-in-2025) - [Native Web Apps: Are We There Yet?](https://www.wearedevelopers.com/magazine/83-native-web-apps-are-we-there-yet) - [A Guide to Choosing the Right Tools for App Developers](https://www.wearedevelopers.com/magazine/391-a-guide-to-choosing-the-right-tools-for-app-developers) - [Using Java 17 latest features in real world projects](https://www.wearedevelopers.com/magazine/121-using-java-17-latest-features-in-real-world-projects) ## Related Jobs - [Senior Software Engineer, Android (Earn Experience)](https://www.wearedevelopers.com/jobs/ext/1937627-senior-software-engineer-android-earn-experience) at **Bitpanda** - [iOS Engineer, Swift/SwiftUI/Combine (B2C Broker)](https://www.wearedevelopers.com/jobs/ext/1611832-ios-engineer-swift-swiftui-combine-b2c-broker) at **Bitpanda** - [Senior React Native Developer](https://www.wearedevelopers.com/jobs/ext/1518176-senior-react-native-developer) at **Almedia** - [Founding Mobile Engineer (iOS)](https://www.wearedevelopers.com/jobs/ext/1648532-founding-mobile-engineer-ios) at **Almedia** - [Senior Software Engineer, Client Apps Platform](https://www.wearedevelopers.com/jobs/ext/1773893-senior-software-engineer-client-apps-platform) at **GitHub** - [Junior Frontend Engineer](https://www.wearedevelopers.com/jobs/ext/1532351-junior-frontend-engineer) at **Almedia**