Antonio Acuña Prieto
11/08/2021, 7:07 PMPaul Woitaschek
11/08/2021, 8:24 PMkpgalligan
11/08/2021, 11:23 PMWill Shelor
11/09/2021, 12:51 AMPaul Woitaschek
11/09/2021, 8:25 AMI’d recommend having a Gradle masterThanks to KMM I kind of became one 😁
Learning the limitations of the iOS side can help write Kotlin code that is also good iOS code.And there are many things you'll just find out after some time. I've set up a guideline on what works and what not. • Many things are big questions like. How can I transform from a flow to a publisher? • What strategy do we have to marry the reactive code that android devs write with the imperative code the iOS devs write? • Which layers do we move to shared and which don't we? • How do we expose our shared lib to iOS and Android? • [...] And then there are many many smaller things to know. For example: • in Swift every object has a "description" which is equivalent to kotlins toString. We've put a description in data classes many times and that leads to a
_description
being exposed to iOS which is confusing.
• Inline classes export as their backing property
• [...]
We found a solution to every problem so far and the journey was well worth it. Especially my teams got really close together in the process. Before our project with the internal code name "MobileShared" came into live, android and iOS were basically separate islands.
Now we all meet regularly together and more work as one unified team.hfhbd
11/10/2021, 3:30 PMFlow
into a Binding/State
? My converter works only half the time, because there is no backpressure, with results into update the UI too often.
Current workaround is transforming it to a publisher and use receiveOn
in the Swift view, which updates the state. But this requires a seconds state...Paul Woitaschek
11/11/2021, 7:19 PMhfhbd
11/11/2021, 8:45 PMswift
extension Binding {
init(_ flow: MutableStateFlow) {
self.init(get: {
flow.value as! Value
}) { newValue in
flow.setValue(newValue)
}
}
}
Paul Woitaschek
11/12/2021, 5:53 AMhfhbd
11/12/2021, 11:22 AMPaul Woitaschek
11/12/2021, 11:23 AM