Write robust native applications for iOS and Android efficiently
by Robert Nagy (Author)
Explore the new Kotlin Multiplatform to build native apps for Android and iOS while sharing business logic between 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 cross-platform technologies, such as React Native and Flutter, and code sharing options, such as C++. You'll then see how your team can use this software development kit (SDK) to build native applications more effectively by learning timeless concepts and working through practical examples. As you advance, you'll get to grips with the core concepts, understand why UI sharing fails, and get hands-on with developing a small KMM application. Finally, you'll discover expert tips and best practices, along with production- and adoption-related questions, that will help you take the next step in your project and career.
By the end of this Kotlin book, you'll have gained a solid understanding of the capabilities of KMM and be able to share code between Android and iOS flexibly.
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 KMM 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 or Kotlin and iOS with Objective-C or Swift. For Swift developers, the book assumes no knowledge of Kotlin as this will be covered in the context of Swift.
Table of Contents
The 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 Shared Code
Writing the Android Consumer App
Writing an iOS Consumer App
Exploring Tips and Best Practices
Integrating KMM into Existing Android and iOS Apps
Summary and Your Next Steps