Join Slack
Powered by
How can I collect a flow in swift using KMM?
# multiplatform
h
Hossein Amini
04/16/2021, 11:23 AM
How can I collect a flow in swift using KMM?
m
Martins Iroka
04/16/2021, 2:22 PM
Have you checked Kampkit repo? You may find a way of doing that from there. Here's the link incase you're interested.
https://github.com/touchlab/KaMPKit
🙏 1
j
John O'Reilly
04/16/2021, 2:25 PM
fwiw there's also example in
https://github.com/joreilly/PeopleInSpace
- this maps from Kotlin flow to Swift Combine publisher (some more background in
https://johnoreilly.dev/posts/kotlinmultiplatform-swift-combine_publisher-flow/
).
🙏 1
h
Hossein Amini
04/16/2021, 2:29 PM
Thank you guys I'll check them out 🙏
👍 1
m
Mustafa Ozhan
04/16/2021, 2:55 PM
You can check the example from my project too! here is viewmodel in common (ios)
https://github.com/CurrencyConverterCalculator/CCC/blob/master/client/src/iosMain/[…]kotlin/com/github/mustafaozhan/ccc/client/base/BaseViewModel.kt
and here how you observe in Swift
https://github.com/CurrencyConverterCalculator/CCC/blob/master/ios/CCC/Observable/ObservableSEED.swift#L45
🙏 1
1873
Views
Open in Slack
Previous
Next