Hi guys, im an android dev and i have a desition t...
# compose-ios
m
Hi guys, im an android dev and i have a desition to make: I am hired to do a freelance job, a simple APP (android & ios) that will need to make use of Firebase auth, Places Autocomplete, Camera Access to capture photos. I have experience with compose, and building a whole app in Android, but never made any KMM project, neither flutter. is it possible to have all those functions in shared code? I dont know anything about IOS. So I have to decide to go for KMM with compose or go with flutter. What would you recommend?
a
All things you mentioned except of camera (you will need an expect/actual for it) are possible to have in shared code. If you don't have an experience with Flutter but have with Compose it should be easier for you to go for KMM and Compose Multiplatform. But note that Compose for iOS is in Alpha and doesn't have some features that Flutter have. Some useful links for you if you decide to go with Kotlin: • KMP Firebase SDKImage viewer example with Compose Multiplatform camera implementation (and photo capture)
d
For now, Compose for iOS is in alpha status and may have bugs. Also, backward compatibility may break. Please take your decision responsibly. Sure, Compose Multiplatform is familiar for Android App developers. Same language, same concepts. We have a sample with camera access here: https://github.com/JetBrains/compose-multiplatform/tree/master/examples/imageviewer As I understand, Firebase also has a library for Kotlin Multiplatform: https://firebaseopensource.com/projects/gitliveapp/firebase-kotlin-sdk/
m
Thanks guys!
j
I have the exact same experience. Was deciding between Flutter and KMM/KM Compose. I feel Kotlin as language more spread and easier work with compared to Dart and KMM make very easy interop both swiftUi and Android compose stuff but also androidx lifecycle. The complexity I went into was dealing with navigation. To solve it I used in iOS TabView interop per tab using Compose. Then getting benefit of that, but most important thing back gestures and Androidx navigation working with androidx viewmodels. I know there is Decompose and Voyager but imo not longterm scaling yet. And if need non shared code you can always fall back to actual / expect in KMP. By far best thing was I could re-use my Gradle knowledge and using TOML, convention plugin etc for all platforms. The drawbacks so far for me is need to use cocoapods in iOS, to get resources like images working somewhat shared.