A Cheatsheet for Dual Native Development

<p>If you want to develop in both native languages at the same time, this article includes several fundamental code examples for both Swift and Kotlin.</p> <p><img alt="A screenshot of Xcode and Android Studio with both previewing a hello world app" src="https://miro.medium.com/v2/resize:fit:630/1*DljNGTQ-LPr8AAS7bkl0kA.png" style="height:378px; width:700px" /></p> <h1>Basic Setup</h1> <p>When writing code in Android Studio, there is one preference that you will want to turn on in your settings, that is Auto Import and Auto Clean Up.</p> <p>Unlike SwiftUI where most components are included when you &ldquo;import SwiftUI&rdquo; at the top of the file, Jetpack Compose is based on Kotlin/Java where you will import every component that you use. Having the Auto import settings turned on will save you a lot of time trying to figure out which version of a thing to import (I learned this the hard way). The screenshot below has the options we want to turn on highlighted.</p> <p><img alt="" src="https://miro.medium.com/v2/resize:fit:630/1*PIZ3kAhkOCuDrj5DnbwnMA.png" style="height:509px; width:700px" /></p> <p>I intend for this to be a living document, changing and improving as my knowledge grows, so if you don&rsquo;t find what you&rsquo;re looking for today, feel free to save this article to your bookmarks and check back later to see if it has been added.</p> <p><a href="https://medium.com/@jpmtech/a-rosetta-stone-for-dual-native-development-5e948752dc17">Click Here</a></p>