Skip to content
BENIBIX Learn

Swift, Kotlin and Dart

Level 4 · Languages for phones

The languages behind phone apps. Swift for iPhone, Kotlin for Android, Objective-C before Swift, and Dart, which builds for both with Flutter.

Course contentsLesson 9 of 12

Level 3 · General-purpose and systems languages

  1. Python, Java and C#
  2. C, C++, Rust and Go

Level 4 · Languages for phones

  1. Swift, Kotlin and Dart

Level 5 · Data and functional languages

  1. R, Julia and MATLAB
  2. Haskell, Scala and Elixir

Level 6 · Scripting languages

  1. Shell Scripts, Perl and Lua

After this lesson you can

  • Name the main language for iPhone and for Android
  • Say what came before Swift
  • Explain how Dart and Flutter build for both phones

12 mincovers 4 glossary entries

Worth reading first: Python, Java and C#

Which languages build iPhone and Android apps

Phone apps are mostly written in one of three languages. Swift builds apps for the iPhone and iPad, and for macOS. Kotlin builds apps for Android. Dart, with the Flutter toolkit, builds one app that runs on both. All three are modern, compiled and statically typed.

Swift comes from the company that makes the iPhone. It was first shown in June 2014. It is safer and easier to read than what came before. Its types make you say when a value might be missing, which stops a common kind of crash. Apple's own screen-building tool, SwiftUI, is written for it.

Before Swift, iPhone apps were written in Objective-C. It is built on C, with extra rules for sending messages. Its square brackets make it look odd at first. Many older apps still hold it, and Swift can call it. So the two often live side by side in one app.

Kotlin was made by JetBrains, the company behind many coding tools. It runs on the JVM, side by side with Java, and can call Java code directly. In 2019 Google said Android would be Kotlin first. Today it is the main choice for new Android apps.

Dart comes from Google too. On its own it is a tidy general language, but it is known for Flutter. Flutter draws every button and screen itself, so one Dart codebase makes an iPhone app and an Android app that look the same.

Which to pick? Swift if your app is only for iPhone and iPad. Kotlin if it is only for Android. Dart and Flutter if you want both from one codebase with a small team. Two separate apps feel most at home on each phone, at the cost of writing everything twice.

A common mistake is thinking you must learn Java to build Android apps. Java still works, but Google's own guides and samples now come in Kotlin first.

Which one to pick

  1. 1

    Swift

    Pick it when the app is for iPhone, iPad or macOS only.

  2. 2

    Kotlin

    Pick it when the app is for Android only.

  3. 3

    Dart with Flutter

    Pick it when one small team must ship to both stores from one codebase.

  4. 4

    Objective-C

    Learn to read it when you take over an older iPhone app.

Each phone toolkit has its language. Flutter's choice to paint every pixel itself is what lets one Dart app run on both.

Worked example

Lucy's team of two ships to both stores

Lucy has 2 developers and needs a booking app on iPhone and Android. Two native apps would mean writing each screen twice.

They build it in Dart with Flutter instead. One codebase of 40 screens ships to both stores in 4 months.

The words for this lesson4

Check yourself

Which language does Google now recommend first for new Android apps?

Finished this lesson?

Marking it complete also marks its 4 glossary entries learned, which updates your roadmap and your saved page. 0 are already marked.