https://kotlinlang.org logo
#ios
Title
# ios
u

ursus

03/20/2022, 1:09 PM
Hi, im a android senior but would like to dabble in ios. Could someone point me on the libraries? Hey, I’m trying to get a working knowledge of ios/swift (to get kmp going) Does someone here know what’s the state of the art for ios in terms of libraries? 1. What’s the go to persistance library? (is sqlite popular as well?) 2. What’s the go to networking library? 3. What’s the go to DI library? 4. What’s the go to reactive framework? (I read there is frst party Combine?) 5. What’s the status of async-await? Does it play nice with Combine as suspend functions do with kotlin Flow? 6. Should I still bother to learn UIKit when swift ui exists? Is it not prod ready? 7. What package manager?
a

adjpd

03/20/2022, 2:52 PM
I'm using KMM. Sqldelight works well. Ktor for networking. @State in SwiftUI does suits me when it comes to reactive/recomposing. Cocaopods and swift packages work well for packing things up. I use coroutines with in a KMM module for everything async, and StateFlow's work well.
u

ursus

03/20/2022, 10:18 PM
I mean straight ios, not kmm
m

Matti MK

03/25/2022, 3:57 PM
Having done both KMM and regular iOS development I’d say that these are completely different to tackle. Firstly, declarative UI paradigms are recommended/favoured for KMM and thus you’d likely go with SwiftUI. For fully native iOS both UIView based views and SwiftUI are equally suitable. Secondly, using KMM you’ll most likely want to share as much of the business logic as possible, which implies going with dependencies that support multiplatform. This means that iOS specific dependencies (such as what you are asking for) won’t likely be used. In fully native iOS world you’d see Realm/SQLite/CoreData, whereas on KMM you’ll find SQLDelight (as well as Realm). For networking it’d be
Alamofire
, whereas on KMM
ktor
. The list goes on. I’d say that there’s a clear choice to be made between KMM and fully native iOS. From dependency perspective you can’t reasonably learn both in one shot.
What’s the go to DI library?
I’ve only used SwInject, in general for iOS development you won’t see similar tooling available for DI as with Android. For KMM, you can go pretty far with Koin, dependending on how much of the business logic you end up sharing.
What’s the go to reactive framework? (I read there is frst party Combine?)
Combine, RxSwift, ReactiveSwift. For KMM Kotlin Flows
Should I still bother to learn UIKit when swift ui exists? Is it not prod ready?
It’s prod ready but rough on the edges compared on Compose. Prod-readiness also depends on your iOS target, if you are going to target 13 I’d say it’s not production ready (and won’t be AFAIK) and you are better off with UIKit. For 14 and 15 it’s pretty nice.
What package manager?
SPM or CocoaPods. Both will be relevant even if you go with KMM.
👍 1
7 Views