Compose navigation is really what lets iOS down wh...
# compose-ios
m
Compose navigation is really what lets iOS down when building a CMP app. I’m wondering whether I build out my navigation/coordinator flow natively by simply embedding each
ComposeUIViewController
in the
UINavigationController
However it seems @Kashismails has put together a working demo using Voyager. I wonder if anyone else is using a setup like this and in production? https://www.droidcon.com/2024/09/06/using-native-ios-navigation-from-compose-multiplatform/
j
What are the limitations of Compose Navigation that you are running into?
m
It doesn’t feel native. Animations are pretty bad, no amount of tweaking gives the native feel
j
Do they feel native with Voyager?
m
Even the back gesture just feels bad
Well I haven’t given it a go yet. But the tutorial is explaining using native UIKit navigation in the ios source set behind Voyager
j
If I understand, Voyager wraps a SwiftUI NavigationStack and host your composable code?
m
Nope. UIKit UINavigationController which hosts the Composable views through
ComposeUIViewController
j
I can see how this would achieve the “native” iOS navigation animations.. I’m not a fan of resigning navigation constrol to outside of “compose”. I would imagine it would make it harder to tweak and customize but that’s pure speculation on my part… Have you downloaded the 2025 KotinConf app on iOS? It’s build using
NavHost
? The animations look and feel native to my eyes (I’m an Android users so I don’t notice all nuances).
👀 1
m
Just had a look and although the back gesture does work better than my implementation. The animations just don’t feel right! Yup make sense you don’t notice the nuances
j
What is “don’t feel right”?
m
well… doesn’t feel native!
j
Comparing it with the Slack app the overall animation seems correct. An issue that I do notice is when performing a slow/peek “back gesture” navigation. It looks like there is a brief pause of a few frames dragging the “exiting” screen doesn’t seem to run at the correct frame rate 🤷🏿‍♂️. Quickly swiping looks smooth to me. Animating to a new screen looks correct.
1