Kotlin for Swift Developers
summary
Converts a small iOS to‑do app (UITableView, JSON API) into a working Android app (RecyclerView) by copy‑pasting and adapting Swift to Kotlin code, demonstrating concrete differences: val vs var, nullability and early returns, Swift value-type structs vs Kotlin reference data classes, smart casting and pattern matching, and using sealed classes instead of Swift enums. Networking uses Retrofit and shows handling nullable response bodies. The converted app runs and the demo highlights exact code changes and pitfalls to watch for.
AI-written summary · about
chapters (25)
- 0:00Intro
- 0:30Show of Hands
- 0:47Introduction
- 1:16Swift vs Kotlin
- 2:21String Interpolation
- 4:58Create a Person
- 5:10Set a Name
- 5:34Greetings
- 6:30Initializers
- 6:54Default Constructor
- 7:33Struts
- 7:47DefaultStrut
- 8:12Data Classes
- 10:13DisplayShape
- 10:45SmartCasting
- 12:34Demo
- 13:44Swift Code
- 14:34API Client
- 16:04Call API Client
- 16:53Convert to Kotlin
- 17:50Create Extension
- 19:08Implement API Response
- 20:21Implement two methods
- 23:42Implement viewcontroller
- 25:46Summary
related talks
41mIf your code looks like it's Kotlin & quacks like it's Kotlin, then it probably is Swift.
22mIf your code looks like it’s Kotlin & quacks like ...
40mKotlin Multiplatform. Make your Android App Cross-Platform
42mIf your code looks like it's Kotlin & quacks like it's Kotlin, then it probably is Swift.
49mKotlin: the swift of Android
51mLessons learned from porting to Swift and Kotlin
48mKotlin for Android, iOS & the mobile web
21mKotlin For Swift Developers
