Last updated on March 9, 2021
For its production app, Netflix is trying multi- platform programming in Kotlin . That should be expanded even further.
The video streaming service Netflix supports the production of its own series and films with its own mobile app. In order to implement fast delivery of the app, the responsible development team uses a multi-platform approach. This is expanded by those involved in that platform agnostic code for iOS and Android is only written once in the Android language Kotlin and then used for both systems.
As the team writes in Netflix's tech blog , the code is created on the one hand as a library for Android and on the other hand as a native universal framework for iOS. The latter is done with the help of Kotlin-Native , with the code being translated natively for iOS instead of being executed in the JVM as usual.
Platform -specific code only needs to be written "if this is necessary, for example, for the implementation of a native user interface or for working with platform-specific APIs," writes the Netflix team. This is a different approach to a multi-platform strategy than usual, where otherwise platform-specific technologies are often abstracted.
The best from both worlds
For Netflix, however, their own approach has the advantage that both apps share the architecture with similar or even the same application logic, around half of the code works decoupled from the underlying platform, but the team can also continue to use new technology from the two platforms. These include Jetpack Compose for Android or Swift UI for iOS .
According to Netflix, Kotlin Native has now reached a "turning point" that apparently justifies the use of the technology. This applies above all to tools and the integration into Apple's Xcode. After all, according to the blog entry, the advantages of the common code base clearly outweigh the disadvantages of the slightly increased complexity.