I've just published a blog post on generating swif...
# kotlin-native
p
I've just published a blog post on generating swift code for kotlin native using KSP and swiftpoet: https://medium.com/@woitaschek/kotlin-native-using-swift-not-objective-c-d7742c040539 I'd love to hear your feedback on this 🙂
🤩 3
👀 2
👍 1
h
Sounds interesting, but why did you skip the UI part? I thought, you also generate SwiftUI relevant parts 🙂
p
I generate structs from the view states. But that's quite some complex logic, I just wanted to share the possibility this opens
h
Ah nice! So in SwiftUI, you "still" need to write the
@State
and
Flow
collecting and mapping part.
p
There is another codegen part that creates extensions on all viewModels returning an
IOSFlow
and then there is a part converting it to Publishers
1
a
in this issue of moko-mvvm we implementing compiler-plugin that will create extensions for all
Flow
without annotations 🙂 here draft now
👍 1
p
I have that one running without annotations as well 😛
We create it for functions as well and pass the arguments through
@alex009 Wouldn't it make more sense on the moko-kswift level?
a
@Paul Woitaschek kswift for now just gradle plugin, without compiler api usage. but it can be moved to kswift as additional plugin with compiler api usage....now it's just experiment inside moko-mvvm because we want to migrate from livedata to stateflow and not want to create manually extensions with
CFlow
type 🙂