

In this case, we can now access Dog.isGood, which will always return true š¶. When I first saw this, my mind went to the C++ friend keyword š, but all it does is provide us an area to define static-level members for the Dog class. In Swift, you might represent it with a struct like this: struct Dog : Equatable Letās walk through a quick comparative example between Kotlin and Swift. This got me enough Kotlin knowledge to where I could write working code and test things out with iOS. When Kotlin multiplatform became a possibility for us, I got my start with Kotlin Koans. In this case, that foundation is Kotlin multiplatform.ÄŖ year ago, I hadnāt written any Kotlin. If nothing else, it highlights what you can build on a foundation of great tooling. But, if I also want to write this app for Android and am limited in the number of engineers (just me in this scenario), why would I set myself up to write the same app in two languages? JetBrains announced at KotlinConf 2019 that youāll be able to build and iterate on an iOS and Android app simultaneously in Kotlin using Android Studio. Swift is an impressive language with lots of useful modern features. If I were starting an app from scratch today, itās hard to say what language I would write it in. Iāll start with Kotlin and work my way through multiplatform. To get started, Iām going to write a bit about Kotlin and Kotlin multiplatform from the perspective of someone (me) who came at this from iOS development. After a year of learning how all of the various parts of Kotlin multiplatform fit together to make that project work, I felt motivated to make this blog to write about it.

We started exploring how to share code between our native mobile platforms at the end of 2018, and we wrote a bit about that in a recent post here. The iOS version is written in Swift (some Obj-C too because itās older), but now most of the code I write day-to-day for the iOS app is in Kotlin. PlanGrid is a construction productivity tool that works on iOS, Android, and even Windows š±. Iām an iOS engineer at Autodesk where I work on the PlanGrid app. Getting Started with Kotlin on iOS, Part 1
