McDonald's May 2, 2023

Mobile Multiplatform Development at McDonald's

Article Summary

Austin Keith and Ryan Sander from McDonald's reveal how they're eliminating duplicate codebases across iOS and Android without sacrificing native performance. Their solution challenges the assumption that cross-platform means compromising on user experience.

McDonald's Global Mobile App team adopted Kotlin Multiplatform Mobile (KMM) to share business logic across platforms while maintaining native UIs. The approach lets them write complex menu logic, localization, and data parsing once instead of twice, reducing both development time and testing burden.

Key Takeaways

Critical Insight

McDonald's reduced redundant code and testing by sharing business logic through KMM while preserving platform-native performance and UI responsiveness.

The article details specific challenges iOS developers face when adopting KMM and how McDonald's structured their testing strategy to achieve full coverage.

About This Article

Problem

McDonald's ran into trouble when iOS developers had to learn Kotlin to use KMM, even though Kotlin and Swift are similar. The bigger issue was that many third-party libraries didn't have Kotlin versions available.

Solution

McDonald's filled these library gaps by using Kotlin's expect/actual pattern to handle platform-specific code. They also upgraded to the latest Kotlin versions, which fixed crashes caused by asynchronous method calls in the older memory model.

Impact

McDonald's isolated menu logic, localization, and configuration in KMM. This let them run full end-to-end tests on the database and business logic without building the entire app each time. Teams across global markets could ship features faster as a result.

Related Articles