We've just published one of our internal KMP playground projects, some of the key points being: - A ...
n
We've just published one of our internal KMP playground projects, some of the key points being: • A shared ViewModel layer • Declarative UI (Compose & SwiftUI) • Image upload • Shared localization (with moko-resources, thanks to @alex009 & the IceRock team) • multiple KMP modules • Android & iOS targets (with macOS coming soon, desktop & web planned) Big thanks to @John O'Reilly & the Touchlab team, since some of the setup is based on either PeopleInSpace, BikeShare or KaMPKit You can find the repository here
❤️ 1
K 11
👍 20
👏 6
K 6
a
good work! do you try use moko-mvvm for share viewmodels?
n
@alex009 it’s definitely on the roadmap, though we’ve been waiting for #65, since with compose we didn’t need a lot from the artifact
and as I see this was released 3 days ago, so I’ll definitely give it a go in the coming days, thanks 😄
a
yes, now mvvm have many artifacts for many usecases 🙂 good luck and will be glad to receive feedback
👍 2
l
I'll go read but file upload piqued my interest? ktor? services? pendingintentservicecoroutineworkers?
n
@ludOS we’re using a simple
expect/actual
for the files, because of the following reasons: • For the KTor multipart we only needed a
ByteArray
representation of the file • The
actual typealias
-es work really well with our unidirectional flow: we get back either `NSImage`/`UIImage` or a wrapped
Uri
on the platforms
1
l
Link to files ? 😅
n
./shared/util/File.kt -> Though I should probably correct myself that this has to be tweaked on the iOS side for a more general file handling, since the current implementation is for Image file picking
👍 1
l
Yes I saw the image picking ans was a little confused 🙂
😁 1
n
Sorry about that, will edit the post 🙂
👍 1
❤️ 1
j
Thank you for sharing this, Im working on similar project and the lack of materials makes it hard. 🙂
👍 2
l
Oh. Interrewsting. Any prep work done on the CI or from scratch? Any issue or something in the repo to put the work? 🙂 I collaborated on these workflows and would enjoy trying a hand at KMM: https://github.com/MobilityData/gtfs-validator/actions
n
#5 - we had a WIP gitlab-ci setup with two stages (common -> independent platform jobs), which was dropped when we moved to Github
1
on iOS we were just running
xcodebuild
. Your contribution @ludOS is more than welcome, and I'm happy to share some gists if needed 😄
👍 1
❤️ 1
j
I also have experience with setting up CI/CD on iOS, Android and RN. I wonder if it would be possible to do it in fastlane, that would be nice. I will soon have to implement some solution in my job, so I might share it.
😍 2
👀 1
n
Yes, it should be possible with fastlane, we’ve also gone down that path on our WIP branch. If I remember correctly there are some articles about it also
👀 1
l
I propose I will create an issue regarding GitHub Action setup. I'll contribute at least the prep work directly in the issue, with a linked PR. I'll watch with interest (I have no idea what fastlane is for example 🙂 )
👍 3
🙏 3
Here we go https://github.com/halcyonmobile/MultiplatformPlayground/issues/6 I'm about to go through an airports vortex but I'll definitely find time on the 🏝️
👍 3
q
Hi can anyone build the project? I’m seeing
Exception is: org.gradle.api.GradleException: Please initialize at least one Kotlin target in 'common (:common)'.
Im on Android Studio Arctic Fox | 2020.3.1 Canary 4 Build #AI-202.7319.50.2031.7049475, built on December 23, 2020
n
@Qracle there is an open issue, should work with canary 2
l
Progress under the 🌅 https://github.com/f8full/MultiplatformPlayground/pull/2 I will mark you as reviewer @nrobi when this PR content will be ready for inspection. Thks
👍 1
👀 1