Explore the new Kotlin Multiplatform to build native apps for Android and iOS while sharing business logic between the apps
Key Features
- Improve app development speed dramatically by writing the business logic in Kotlin
- Implement a native user interface and work with platform-specific APIs
- Leverage Kotlin Multiplatform Mobile's code-sharing capabilities for your projects
Book Description
Sharing code between platforms can help developers gain a competitive edge, and Kotlin Multiplatform Mobile (KMM) offers a sensible way to do it. KMM helps mobile teams share code between Android and iOS in a flexible way, leaving room for native development.
The book begins by helping you to gain a clear understanding of the Kotlin Multiplatform approach, how it works, and how it is different from both cross-platform technologies, such as React Native and Flutter, and code sharing options, such as C++. You'll then learn how your team can leverage this software development kit (SDK) to build native applications more effectively using timeless concepts combined with practical examples and expert tips. As you advance, you'll get to grips with core concepts and understand why UI sharing fails, and get hands-on with developing a small KMM application. Finally, you'll discover tips and best practices along with production and adoption-related questions to arm you with the necessary knowledge to enable you to take the next step in your career and project.
By the end of this Kotlin book, you'll have gained a solid understanding of what Kotlin Multiplatform Mobile provides and be able to share code between Android and iOS in a flexible way.
What you will learn
- Get acquainted with the multiplatform approach and KMM's competitive edge
- Understand how Kotlin Multiplatform works under the hood
- Get up and running with the Kotlin language quickly in the context of Swift
- Find out how to share code between Android and iOS
- Explore tips and best practices in Kotlin Multiplatform Mobile to increase app development efficiency
- Discover adoption tips to integrate KMM into existing or new production apps
Who This Book Is For
This book is for native Android and iOS developers who want to build high-quality apps using an efficient development process. Knowledge of the framework and the languages used is necessary; that is, Android with Java and Kotlin and iOS with ObjC/Swift. For Swift developers, the book assumes no knowledge of the Kotlin as this will be covered in the context of Swift.
Table of Contents
- Battle between Native, Cross-Platform, and Multiplatform
- Exploring the Three Compilers of Kotlin Multiplatform
- Introducing Kotlin for Swift Developers
- Introducing the KMM Learning Project
- Writing the Shared Code
- Writing the Android Consumer App
- Writing the iOS Consumer App
- Exploring Tips and Best Practices
- Integrating KMM into Existing Android and iOS Apps
- Summarizing and Next Steps