touchlab / KaMPKit

KaMP Kit by Touchlab. A collection of code & tools designed to get your mobile team started quickly w/Kotlin Multiplatform
https://touchlab.co/
Apache License 2.0
2.2k stars 199 forks source link

Initial PoC Koin refactor to try and tame API and configure from iOS side #114

Closed russhwolf closed 4 years ago

russhwolf commented 4 years ago

Had Koin on my mind tonight so I thought I'd give this a spin.

russhwolf commented 4 years ago

Rebased and updated. Android is now doing the same thing as iOS. I'm still ambivalent about whether the ceremony to configure Koin from Swift is worthwhile, but either way it's an interesting demo.

ben-whit-ley commented 4 years ago

I think we're starting to use a lot of force unwraps on the Swift side. If the number of unknown states - where the app can't really function because something necessary is missing - is growing, then I think we should discuss creating a task/issue for more comprehensive error handling.

russhwolf commented 4 years ago

I think the force-unwraps introduced here all make sense, but open to further discussion. Maybe it's something we should add some doc notes on to clarify best practices, particularly around ways that Swift/iOS norms might differ from Kotlin/Android ones.